返回顶部

收藏

根据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>

标签:css

收藏

0人收藏

支持

0

反对

0

发表评论