请检查,谢谢。float作业
来源:3-4 编程练习
一个文艺的IT青年
2020-08-03 15:47:21
<!DOCTYPE html>
<html>
<head>
<!-- 此处编写样式 -->
<style type="text/css">
*{
margin:0;
padding:0;
}
.container{
width:1026px;
border:1px dashed #eaeaea;
padding:20px auto;
margin: 0 auto;
overflow:hidden;
zoom:1
}
.div{
width:300px;
border:1px solid #eaeaea;
margin:20px;
float:left;
}
img{
width:300px;
}
p{
font-size:16px;
line-height:16px;
padding:5px;
}
</style>
</head>
<body>
<!-- 此处写代码 -->
<div class="container">
<div class="div">
<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="div">
<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="div">
<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="div">
<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="div">
<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
<div class="div">
<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">
<p>欢迎来到慕课网学习新知识!</p>
</div>
</div>
</body>
</html>
1回答
同学你好,代码效果正确。继续加油,祝学习愉快~
相似问题