请看一下,有没有哪里出问题了
来源:3-24 编程练习
慕村8326374
2021-05-18 23:57:32
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- <meta name=""> -->
<style>
#box{
width:80%;
margin:0 auto;
background: #ccc;
text-align:center;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
#box>img{
display:inline-block;
padding:1.5%;
width:21%;
height:200px;
}
/*此处写代码*/
@media screen and (max-width:960px){
#box>img{width: 26.6666666666%;}
}
@media screen and (max-width:780px){
#box>img{width: 40%;}
}
@media screen and (max-width:440px){
#box>img{width: 100%;}
}
</style>
</head>
<body>
<div id="box">
<img src="http://img.mukewang.com/climg/5a45e49100014e5010601059.jpg" alt="">
<img src="http://img.mukewang.com/climg/5a45e53b00012e6d09940789.jpg" alt="">
<img src="http://img.mukewang.com/climg/5a45e53c0001d04e09940732.jpg" alt="">
<img src="http://img.mukewang.com/climg/5a45e49100014e5010601059.jpg" alt="">
<img src="http://img.mukewang.com/climg/5a45e53b00012e6d09940789.jpg" alt="">
<img src="http://img.mukewang.com/climg/5a45e53c0001d04e09940732.jpg" alt="">
</div>
</body>
</html>
1回答
同学你好,没有问题,效果是正确的,继续加油,祝学习愉快~
相似问题