2-13 帮我看看?老师谢谢
来源:2-14 编程练习
Mr丶Zhang小
2018-02-02 17:47:50
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
ul,li,body,img,div{
padding: 0;
margin:0;
}
.container{
width:90%;
height:600px;
margin:0 auto;
}
.imgtop{
width:100%;
height:400px;
background-color:skyblue;
}
.imgtop .bigimg{
width: 50%;
height: 400px;
float: left;
text-align: center;
}
.imgtop .bigimg img{
position: relative;
top:calc(50% - 107px);
}
.smallimg ul li{
width: 100%;
height: 200px;
background-color: pink;
float: left;
list-style: none;
width: calc(100% / 3);
text-align: center;
}
.smallimg img{
position: relative;
top:calc(50% - 15px);
}
</style>
</head>
<body>
<div class="container">
<div class="imgtop">
<div class="bigimg">
<img src="http://climg.mukewang.com/58c0f808000129a303600215.jpg" alt="">
</div>
<div class="bigimg">
<img src="http://climg.mukewang.com/58c0f819000198a703600214.jpg" alt="">
</div>
</div>
<div class="smallimg">
<ul>
<li><img src="http://climg.mukewang.com/58c0f81d0001fe4402000060.jpg" alt=""></li>
<li><img src="http://climg.mukewang.com/58c0f8220001dfce02000060.jpg" alt=""></li>
<li><img src="http://climg.mukewang.com/58c0f8780001c74602000060.jpg" alt=""></li>
</ul>
</div>
</div>
</body>
</html>1回答
小丸子爱吃菜
2018-02-02
实现的思路没什么问题,可以再尝试上图片之间的距离均匀些~也就是图片与图片,图片与父盒子的距离一样,可以再看看效果图

祝学习愉快!
相似问题