3-2练习,老师还有啥能改进的地方?
来源:3-2 编程练习
zhanghp
2018-02-01 22:32:43
<!DOCTYPE html>
<html>
<head>
<!-- 此处编写样式 -->
<style type="text/css">
*{margin:0;padding:0;}
.border1{
width:800px;
height:auto;
border:1px dashed #e3e3e3;
float:left;
}
.i1,.i2,.i3,.i4,.i5,.i6{
margin:10px 10px;
border:1px solid #d1d1d1;
float:left;
}
p{padding:4px;}
</style>
</head>
<body>
<!-- 此处写代码 -->
<div class="border1">
<div class="i1"><img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg"><p>欢迎来到慕课网学习新知识!</p></div>
<div class="i2"><img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg"><p>欢迎来到慕课网学习新知识!</p></div>
<div class="i3"><img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg"><p>欢迎来到慕课网学习新知识!</p></div>
<div class="i4"><img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg"><p>欢迎来到慕课网学习新知识!</p></div>
<div class="i5"><img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg"><p>欢迎来到慕课网学习新知识!</p></div>
<div class="i6"><img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg"><p>欢迎来到慕课网学习新知识!</p></div>
</div>
</body>
</html>
1回答
建议父元素的样式,如下完善一下,效果会更好些

其中786px=3个图片的宽度和+它们的左右边框之和+它们的左右边距之和
相似问题
回答 3
回答 1