media-query,根据计算根据不同屏幕宽度设置根元素font-size
<style type="text/css">
@media only screen and (max-width: 374px) {
// ipone5
html {
font-size: 86px
}
}
@media only screen and (max-width: 375px) and (max-width: 413px) {
// ipone6/7/8/x
html {
font-size: 100px
}
}
@media only screen and (max-width: 414px) {
// ipone6p或更大尺寸
html {
font-size: 110px
}
}
</style>