html期末设计作业源代码
时间: 2023-12-16 22:01:41 浏览: 37
```html
<!DOCTYPE html>
<html>
<head>
<title>期末设计作业</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}
h1 {
text-align: center;
color: #333333;
}
.container {
width: 80%;
margin: 0 auto;
overflow: hidden;
}
.box {
float: left;
width: 30%;
background-color: white;
margin: 10px;
padding: 10px;
box-sizing: border-box;
border: 1px solid #cccccc;
border-radius: 5px;
}
.img {
width: 100%;
height: 200px;
background-size: cover;
background-position: center;
margin-bottom: 10px;
}
p {
color: #666666;
}
</style>
</head>
<body>
<h1>期末设计作业</h1>
<div class="container">
<div class="box">
<div class="img" style="background-image: url('image1.jpg')"></div>
<h2>标题1</h2>
<p>内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1。</p>
</div>
<div class="box">
<div class="img" style="background-image: url('image2.jpg')"></div>
<h2>标题2</h2>
<p>内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2。</p>
</div>
<div class="box">
<div class="img" style="background-image: url('image3.jpg')"></div>
<h2>标题3</h2>
<p>内容3内容3内容3内容3内容3内容3内容3内容3内容3内容3内容3。</p>
</div>
</div>
</body>
</html>
```