媒体查询常见媒体尺寸和设置

 

@media screen and (min-width:1200px){ ... }/* 大型设备(大台式电脑,1200px 起) */

@media screen and (min-width:992px){ ... }/* 中型设备(台式电脑,992px 起) */

@media screen and (min-width:768px) { ... } /* 小型设备(平板电脑,768px 起) */

@media screen and (min-width:480px){ ... }/* 超小设备(手机,小于 768px) */

在设置时,需要注意先后顺序,不然后面的会覆盖前面的样式。

 

猜你喜欢

转载自blog.csdn.net/luoyu6/article/details/83582796