H5 端 rem 适配方案与 viewport 适配
rem
rem 是 CSS3 新增的一个相对单位(root em,根 em)
只根据当前页面 HTML 页面的 font-size 设置,如果根目录的 font-size 为 18px,则 1rem=18px
媒体查询设置
@media screen and (min-width: 320px) {
html {
font-size: 32px;
}
}
@media screen and (min-width: 375px) {
html {
font-size: 37.5px;
}
}
@media screen and (min-width: 414px) {
html {
font-size: 41.4px;
}
}
@media screen and