/*默认参照iphone6*/ html { font-size: 16px; } /*适配iphone5*/ @media screen and (max-width: 320px){ html { font-size: 13.65px !important; } } /*适配iphone6plus*/ @media screen and (min-width: 376px) and (max-width: 414px){ html { font-size: 17.66px !important; } } /*适配ipad*/ @media screen and (min-width: 415px) and (max-width: 768px){ html { font-size: 32.76px !important; } } /*适配ipad pro*/ @media screen and (min-width: 769px) and (max-width: 1024px) { html{ font-size: 43.69px !important; } }
css 通过rem和媒体查询配合适配各个设备浏览器
最新推荐文章于 2024-08-20 11:47:23 发布