建立三部分
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="div.css">
</head>
<body>
<hr color="#000">
<div class="a1">头部</div>
<div class="a2">主体</div>
<div class="a3">底部</div>
</body>
</html>
div代码如下:
.a1{
height: 150px;
background-color: aqua;
margin-bottom: 10px;
text-align: center;
}
.a2{
height: 400px;
background-color: blue;
margin-bottom: 10px;
text-align: center;
}
.a3{
height: 150px;
background-color: aqua;
text-align: center;
}