请老师检查 谢谢
来源:3-4 编程练习
weixin_慕粉7014616
2020-01-10 22:08:39
<!DOCTYPE html>
<html>
<head>
<!-- 此处编写样式 -->
<title></title>
<style>
*{margin:0;padding:0;}
.a{width:786px;border:1px dashed gray;overflow:hidden;}
.b{width:240px;border:1px solid gray;margin:10px;text-align: center;float: left;}
</style>
</head>
<body>
<!-- 此处写代码 -->
<div chass="a">
<div class="b">
<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="b">
<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="b">
<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="b">
<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="b">
<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="b">
<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
</div>
</body>
</html>
1回答
同学你好,图片排列在一行了:

这是因为有单词拼错,参考如下调整:

另外,给父容器设置一个内边距,让它与图片产生的间距和图片与图片之间的间距保持一致:

如果我的回答帮助到了你,欢迎采纳,祝学习愉快~