代码(移动端rem初始化设置1rem=15px)
这是之前项目的rem基本设置,这样,在vscode中安装cssrem插件后,改成1rem=15px,其他的屏幕也将得到相应适配。
@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 } } @media (min-width: 393px) and (max-width:395px) { html { font-size:15.8px!important } } @media (min-width: 392px) and (max-width:392px) { html { font-size:15.68px!important } } @media (min-width: 432px) and (max-width:432px) { html { font-size:17.28px!important } }
相关推荐
lupeng 2020-11-14
sjcheck 2020-11-10
sjcheck 2020-11-03
meylovezn 2020-08-28
owhile 2020-08-18
Francismingren 2020-08-17
pythonclass 2020-07-29
sunzhihaofuture 2020-07-19
爱读书的旅行者 2020-07-07
行吟阁 2020-07-05
tianqi 2020-07-05
行吟阁 2020-07-04
冰蝶 2020-07-04
lyg0 2020-07-04
owhile 2020-07-04
opspider 2020-06-28
lengyu0 2020-06-28
tianqi 2020-06-21
dadaooxx 2020-06-16