<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
/*超大PC屏幕下的专用样式*/
@media screen and (min-width:1200px) {
div{
width: 500px;
height: 500px;
background: red;
}
}
/*中等PC屏幕下的专用样式*/
@media screen and (min-width:992px) and (max-width: 1199px) {
div{
width: 400px;
height: 400px;
background: red;
}
}
/*PAD屏幕下的专用样式*/
@media screen and (min-width: 768px) and (max-width:991px ){
div{
width: 300px;
height: 300px;
background: red;
}
}
/*PHONE屏幕下的专用样式*/
@media screen and (max-width:767px) {
div{
width: 100px;
height: 100px;
background: red;
}
}
</style>
</head>
<body>
<div>12</div>
</body>
</html>