根据media screen 加载css

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="59.css" media="screen and (max-width:800px)">
    <link rel="stylesheet" href="60.css" media="screen and (min-width:800px)">
    <style>
/*
        @media screen and (max-width:800px){
            .demo{
                background: red;
            }
        }
        @media screen and (min-width:800px){
            .demo{
                background: grey;
            }
        }
*/

    </style>
</head>
<body>
<div class="demo">
    1213121331
</div>  
</body>
</html>
赞(0)
未经允许不得转载:前端精选 » 根据media screen 加载css

前端开发相关广告投放 更专业 更精准

联系我们