<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@media screen and (max-width: 900px) and (min-width: 600px), (min-width: 1100px) {
div.example {
font-size: 50px;
padding: 50px;
border: 8px solid black;
background: yellow;
}
}
</style>
</head>
<body>
<h2>更改 DIV 在不同屏幕尺寸上的外观</h2>
<div class="example">示例 DIV。</div>
<p>当浏览器的宽度在 600 到 900px 之间或超过 1100px 时,更改 DIV 的外观。
<strong>调整浏览器窗口大小以查看效果</strong>。</p>
</body>
</html>