移动端font自适应

html {
    font-size: 125%; /* 20÷16=125% min-font-size:12px bug*/
}
@media only screen and (min-width: 481px) {
html {
    font-size: 188%!important; /* 30.08÷16=188% */
}
}
@media only screen and (min-width: 561px) {
html {
    font-size: 218%!important; /* 38.88÷16=218% */
}
}
@media only screen and (min-width: 641px) {
html {
    font-size: 250%!important; /* 40÷16=250% */
}
}

猜你喜欢

转载自blog.csdn.net/qq_40001322/article/details/81233779

相关文章