常见网页布局
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../css/float3.css">
</head>
<body>
<div class="top">
top
</div>
<div class="banner">banner</div>
<div class="box">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</div>
</body>
</html>
.top {
height: 100px;
background-color: lightblue;
}
.banner {
margin: 10px auto;
width: 400px;
height: 300px;
background-color: lightblue;
}
.box {
width: 400px;
height: 300px;
background-color: lightblue;
margin: 10px auto;
}
.box ul {
padding-left: 0;
}
.box ul li {
list-style: none;
width: 90px;
height: 50px;
float: left;
background-color: pink;
margin-left: 5px;
}
.box ul li:last-child {
margin-right: 0;
}