css 通过rem和媒体查询适配各个设备屏幕

发布: 2018-10-12 |  作者:  |   来源:

上一篇 下一篇

/*默认参照iphone6*/


html {

    font-size: 16px;

}

/*适配iphone5*/

@media screen and (max-width: 320px){

    html {

        font-size: 13.65px !important;

    }

}

/*适配iphone6plus*/

@media screen and (min-width: 376px) and (max-width: 414px){

    html {

        font-size: 17.66px !important;

    }

}

/*适配ipad*/

@media screen and (min-width: 415px) and (max-width: 768px){

    html {

        font-size: 32.76px !important;

    }

}

/*适配ipad pro*/

@media screen and (min-width: 769px) and (max-width: 1024px) {

    html{

        font-size: 43.69px !important;

    }

}

--------------------- 

作者:h1lin0010 

来源:CSDN 

原文:https://blog.csdn.net/h1lin0010/article/details/78961929?utm_source=copy 

版权声明:本文为博主原创文章,转载请附上博文链接!


TAG: css rem 屏幕
上一篇 下一篇