请老师批改一下我的作业
来源:4-11 自由编程
好学生慕小帅
2021-07-28 22:02:20
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回答
好帮手慕星星
2021-07-29
同学你好,已经在另外一个相似问题中进行了回复,可以查看下:
https://class.imooc.com/course/qadetail/297981
建议:提交问题遇到审核时,不要再次提交,避免重复。
祝学习愉快!
相似问题