<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
<style type="text/css">
body{margin: 0;}
.main{width:906px;border:5px solid black;margin:0 auto;}
.main::after{content: "";display:block;clear:both;}
.left{float:left;width:250px;border: 1px solid red;}
.left .top1{height: 100px;background: green;}
.left .top2{height: 200px;background: blue;}
.left .top3{height: 300px;background: gray;}
.left .top4{height: 100px;background: blue;}
.center{float:left;width:400px;border: 1px solid blue;}
.center .top{height: 700px;background: yellow;}
.right{float:left;width:250px;border: 1px solid yellow;}
.right .top1{height: 200px;background: green;}
.right .top2{height: ;ght: 250px;background: gray;}
.right .top3{height: 250px;background: blue;}
</style>
</head>
<body>
<div class="main">
<div class="left">
<div class="top1"></div>
<div class="top2"></div>
<div class="top3"></div>
<div class="top4"></div>
</div>
<div class="center">
<div class="top"></div>
</div>
<div class="right">
<div class="top1"></div>
<div class="top2"></div>
<div class="top3"></div>
</div>
</div>
</body>
</html>
04_03.清浮動
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.