一. @media 格式
@media all and (min-width:xxx) and (max-width:xxx) (亦可以写成@media all and (min-width:xxx) and (max-width:xxx)) {
/*这段查询的all是针对所有设备(有些设备不一定是屏幕,也许是打字机,盲人阅读器)*/
}
@media only screen and (min-width:xxx) and (max-width:xxx){
/*上面针对了所有设备,这段是只(only)针对彩色屏幕设备*/
}
@media only screen and (min-width:1024px) and (max-width:1292px){ body div{ font-size:30px; color:red; } }
原文地址:https://www.cnblogs.com/jiangfeilong/p/11107444.html
时间: 2024-10-06 16:06:40