3-2编程练习 这样写可以吗老师
来源:3-2 编程练习
webxiaofan
2017-08-23 16:38:44
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>test</title>
<style>
*{
margin: 0px;
padding: 0px;
}
.per{
width: 790px;
height: auto;
border:1px dotted #aaa;
margin: 0 auto;
padding: 0px 10px 10px;
}
.one{
margin: 0px 10px 10px;
width: 242px;
float: left;
}
.img{
text-align: center;
font-size: 18px;
border: 1px solid grey;
margin-top: 20px;
}
.tepm{
clear: both;
}
</style>
</head>
<body>
<div class="per">
<div class="one">
<div class="img">
<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg" alt="">
<span>欢迎来到慕课网学习</span>
</div>
<div class="img">
<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg" alt="">
<span>欢迎来到慕课网学习</span>
</div>
</div>
<div class="one">
<div class="img">
<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg" alt="">
<span>欢迎来到慕课网学习</span>
</div>
<div class="img">
<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg" alt="">
<span>欢迎来到慕课网学习</span>
</div>
</div>
<div class="one">
<div class="img">
<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg" alt="">
<span>欢迎来到慕课网学习</span>
</div>
<div class="img">
<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg" alt="">
<span>欢迎来到慕课网学习</span>
</div>
</div>
<div class="tepm"></div>
</div>
</body>
</html>1回答
与效果图一致,没毛病!
另外,如果值是0的话,可以不用加px,直接写0就可以了!
祝学习愉快!
相似问题