效果:
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>百度首页</title>
<style type="text/css">
body{ margin:0; }
.header{ background: blue; width: 100%; height: 100px; }
.logo{ background: red; width: 300px; margin:0 auto; height: 60px; margin-top: 150px; }
.searchbox{ background: red; width: 800px; margin:0 auto; height: 40px; margin-top: 60px; }
.copyright{ width: 100%; background: blue; height: 150px; margin-top: 200px; }
</style>
</head>
<body>
<div>
<div class="header"></div>
<div class="logo"></div>
<div class="searchbox"></div>
<div class="copyright"></div>
</div>
</body>
</html>