我的rem适配方案

1. 简单入门的rem适配方案,纯CSS实现


html{

font-size:20px;

}

@mediaonlyscreenand(min-width:401px) {

html{

font-size:21.33333333px!important;

}

}

@mediaonlyscreenand(min-width:414px) {

html{

font-size:22.08px!important;

}

}

@mediaonlyscreenand(min-width:480px) {

html{

font-size:25.6px!important;

}

}

body{

font-size:16px;

}

你可能感兴趣的:(我的rem适配方案)