CSS----媒体查询设置根节点字体大小

<html>

<head>
    <title>CSS----媒体查询设置根节点字体大小</title>
    <meta name="keyword" content="CSS----媒体查询设置根节点字体大小">
    <meta name='discription' content="CSS----媒体查询设置根节点字体大小">
    <style>
    /* 字体大小 */

    @media only screen and (min-320px) and (orientation:portrait) {
        html {
            font-size: 12px;
        }
    }

    @media only screen and (min-360px) and (orientation:portrait) {
        html {
            font-size: 15px;
        }
    }

    @media only screen and (min-400px) and (orientation:portrait) {
        html {
            font-size: 18px;
        }
    }

    @media only screen and (min-600px) and (orientation:portrait) {
        html {
            font-size: 24px;
        }
    }

    @media only screen and (max-768px) and (orientation:portrait) {}

    @media only screen and (min-480px) and (orientation:landscape) {
        html {
            font-size: 12px;
        }
    }

    @media only screen and (min-580px) and (orientation:landscape) {
        html {
            font-size: 13px;
        }
    }

    @media only screen and (min-730px) and (orientation:landscape) {
        html {
            font-size: 16px;
        }
    }

    @media only screen and (min-900px) and (orientation:landscape) {
        html {
            font-size: 21px;
        }
    }

    @media only screen and (min-992px) {
        html {
            font-size: 24px;
        }
    }
    </style>
</head>

<body>
</body>

</html>

  

原文地址:https://www.cnblogs.com/SunlikeLWL/p/8670558.html