0
点赞
收藏
分享

微信扫一扫

媒体查询自定义栅格系统

 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!--设置缩放和绘制-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>媒体查询自定义栅格系统</title>
<script src="../ mypethome/lib/html5shiv/html5shiv.js" ></script>
<script src="../ mypethome/lib/respond/respond.min.js" ></script>
<style>
/*
* 设置通用样式
*/
*{
margin: 0;
padding: 0;
list-style: none;
}
.container{
height: 40px;
margin: 0 auto;
background-color: gold;
}
/*
* 媒体查询
*/
@media screen and (max-width: 768px) {
/*超小屏幕*/
.container{
width: 100%;
}
}
@media screen and (min-width: 768px) and (max-width: 992px){
/*小屏幕*/
.container{
width: 750px;
}
}
@media screen and (min-width: 992px) and (max-width: 1200px){
/*大屏幕*/
.container{
width: 970px;
}
}
@media screen and (min-width: 1200px) {
/*超大屏幕*/
.container{
width: 1170px;
}
}
</style>
</head>
<body>
<div class="container">

</div>

</body>
</html>


------------恢复内容结束------------


举报

相关推荐

媒体查询~~~~~

媒体查询?

媒体查询教案

~107媒体查询

设置媒体查询

浅谈媒体查询

前端之媒体查询入门

0 条评论