响应式页面代码

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<style>
        @media screen and (min-width: 300px) and (max-width: 500px) {
            body {
                background-color:green;
            }
        }
@media screen and (min-width: 501px) and (max-width:800px){
body {
background-color:lightblue;
}
}


@media screen and (min-width:801px){
body {
background-color:orange;
}
}
</style>
<title>无标题文档</title>
</head>


<body>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/liu709127859/article/details/80180655