码迷,mamicode.com
首页 > 移动开发 > 详细

移动端媒体查询CSS3适配规则

时间:2018-04-20 23:48:50      阅读:422      评论:0      收藏:0      [点我收藏+]

标签:media   ant   媒体查询   important   20px   rem   3.2   css3   imp   

  该媒体查询适配规则是以UI设计图750p宽度为版本的,比如PS量的是450px,在书写时写 (450rem/2/15).

@media (min-width:240px) and (max-width:320px){html{font-size:12.8px!important}}
@media (min-width:321px) and (max-width:360px){html{font-size:14.4px!important}}
@media (min-width:361px) and (max-width:375px){html{font-size:15px!important}}
@media (min-width:376px) and (max-width:384px){html{font-size:15.36px!important}}
@media (min-width:385px) and (max-width:414px){html{font-size:16.56px!important}}
@media (min-width:415px) and (max-width:450px){html{font-size:18px!important}}
@media (min-width:451px) and (max-width:500px){html{font-size:20px!important}}
@media (min-width:501px) and (max-width:550px){html{font-size:22px!important}}
@media (min-width:551px) and (max-width:569px){html{font-size:22.72px!important}}
@media (min-width:569px) and (max-width:640px){html{font-size:25.6px!important}}
@media (min-width:641px) and (max-width:667px){html{font-size:26.68px!important}}
@media (min-width:668px) and (max-width:736px){html{font-size:29.44px!important}}
@media (min-width:738px) and (max-width:768px){html{font-size:30.72px!important}}
@media (min-width:769px) and (max-width:900px){html{font-size:36px!important}}
@media (min-width:901px) and (max-width:1080px){html{font-size:43.24px!important}}

  

移动端媒体查询CSS3适配规则

标签:media   ant   媒体查询   important   20px   rem   3.2   css3   imp   

原文地址:https://www.cnblogs.com/yyy6/p/8893753.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!