顺序, 正常的样式会覆盖媒体查询的样式
min-width :当媒体类型 ≥ 指定的宽度时,大括号内的样式生效;
max-width :当媒体类型小于或是等于指定的宽度时,大括号内的样式生效;
body {
background-color:lightgreen;
}
@media screen and (max-width: 1000px) and (min-width: 700px){
body {
background-color:lightblue;
}
}
@media not print and(max-width:200px){body{background:blue}}
only关键字
评论区