<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/reset.css">
<title>布局</title>
<style>
header,main,footer{
width: 1210px;
margin: 0 auto;
}
header{
height: 150px;
background: #cd6efe;
}
main{
height: 600px;
background: #3a84ff;
}
nav{
width: 300px;
height: 100%;
background: #24253d;
float: left;
}
article{
width: 600px;
height: 100%;
background: #666666;
float: left;
}
aside{
width: 310px;
height: 100%;
background: #f97053;
float: left;
}
footer{
height: 160px;
background: #bbffaa;
}
</style>
</head>
<body>
<header></header>
<main>
<nav></nav>
<article></article>
<aside></aside>
</main>
<footer></footer>
</body>
</html>
Reset.css
結果表示: