请检查代码是否正确

来源:3-4 编程练习

慕前端1500838

2020-06-19 17:49:41

<!DOCTYPE html>

<html>

<head>

    <style>

        *{

margin: 0;

padding: 0;

}

.container{

border: 1px solid #ddd;

overflow:hidden;

zoom:1;

margin: 0 auto;

padding:20px;

width: 766px;

}

.div1{

border: 1px solid #ddd;

float: left;

width: 240px


}

.container .div1{

margin-right: 20px;

margin-bottom: 20px;

}

.container .right0{

            margin-right: 0;

}

.container .bottom0{

margin-bottom: 0;

}

p{

padding-left: 8px;

margin: 10px 0;

}

    </style>

</head>

<body>   

   <div class="container">

<div class="div1">

<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg"/>

<p>欢迎来到慕课网学习知识!</p>

</div>


<div class="div1">

<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg"/>

<p>欢迎来到慕课网学习知识!</p>

</div>


<div class="div1 right0">

<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg"/>

<p>欢迎来到慕课网学习知识!</p>

</div>


<div class="div1 bottom0">

<img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg"/>

<p>欢迎来到慕课网学习知识!</p>

</div>


<div class="div1 bottom0">

<img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg"/>

<p>欢迎来到慕课网学习知识!</p>

</div>


<div class="div1 right0 bottom0">

<img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg"/>

<p>欢迎来到慕课网学习知识!</p>

</div>

</div>

</body>

</html>


写回答

1回答

好帮手慕言

2020-06-19

同学你好,效果是正确的,继续加油,祝学习愉快~

0

0 学习 · 40143 问题

查看课程