html基本响应式布局代码

<!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; //white
            }
        }
@media screen and (min-width: 501px) and (max-width:800px){
body {
background-color:lightblue; //white
}
}

@media screen and (min-width:801px){
body {
background-color:orange; //white
}
}
</style>
<title>网站名称</title>
<meta name="keywords" content="关键词" />
<meta name="description" content="描述" />
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
测试
</body>
</html>

 

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容