rem 自适应类

@media screen and (max-width:320px) {
    html {
        font-size: 32px
    }
}

@media screen and (min-width:321px) and (max-width:340px) {
    html {
        font-size: 34px
    }
}

@media screen and (min-width:341px) and (max-width:360px) {
    html {
        font-size: 36px
    }
}

@media screen and (min-width:361px) and (max-width:400px) {
    html {
        font-size: 40px
    }
}

@media screen and (min-width:401px) and (max-width:420px) {
    html {
        font-size: 42px
    }
}

@media screen and (min-width:421px) and (max-width:480px) {
    html {
        font-size: 46px
    }
}

@media screen and (min-width:481px) {
    html {
        font-size: 48px
    }
}

posted @ 2017-12-08 10:18  我是前端QQ942031558  阅读(103)  评论(0编辑  收藏  举报