请老师帮我批改一下作业
HTML代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css.css">
</head>
<body>
<div class="header">
<h1>GALLERY</h1>
<div class="logo"></div>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting</p>
<p>industry.Lorem Ipsum has been the industry's standard dummy</p>
<p>text ever since the 1500s.</p>
</div>
<div class="content">
<div class="img">
<img src="03-01.jpg" alt="" class="margin-left">
<dl class="margin-left">
<dd>Science Lab</dd>
</dl>
</div>
<div class="img">
<img src="03-02.jpg" alt="" class="margin-left40px">
<dl class="margin-left40px">
<dd>Indoor Stadium</dd>
</dl>
</div>
<div class="img">
<img src="03-03.jpg" alt="" class="margin-left">
<dl class="margin-left">
<dd>Transoprtation</dd>
</dl>
</div>
<div class="img">
<img src="03-04.jpg" alt="" class="margin-left">
<dl class="margin-left">
<dd>Kids Room</dd>
</dl>
</div>
<div class="img">
<img src="03-05.jpg" alt="" class="margin-left40px">
<dl class="margin-left40px">
<dd>Meditation Classes</dd>
</dl>
</div>
<div class="img">
<img src="03-06.jpg" alt="" class="margin-left">
<dl class="margin-left">
<dd>Kids Play Ground</dd>
</dl>
</div>
</div>
</body>
</html>
CSS代码:
*{
margin: 0;
padding: 0;
}
.header{
width: 100%;
}
.header h1{
margin-top: 30px;
font-size: 32px;
text-align: center;
}
.header .logo{
width: 60px;
height: 3px;
background: #07cbc9;
margin: 10px auto;
}
.header p{
text-align: center;
color: gray;
font-size: 14px;
}
.content{
width: 1200px;
height: 653px;
margin: 0 auto;
}
.content .img{
width: 360px;
height: 290px;
float: left;
margin-right: 40px;
margin-top: 30px;
position: relative;
}
.content .img dl{
background: #000;
width: 100%;
height: 50px;
position: absolute;
left: 0;
bottom: 0;
}
.content .img dl dd{
margin-left: 20px;
color: white;
line-height: 50px;
}
.content .img .margin-left{
margin-left: 20px;
}
.content .img .margin-left40px{
margin-left: 20px;
}
正在回答
同学你好,代码布局以及实现效果很棒。继续加油,祝学习愉快!
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星