看代碼說話吧!css
流式佈局.htmlhtml
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>流式佈局</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div id="first">第1個div</div>
<div id="second">第2個div</div>
<div id="third">第3個div</div>
</body>
</html>
style.cssweb
@charset "gb2312";
/* CSS Document */
#first{width:100px; height:100px; background:#00F; float:left;//對象浮在左邊 }
#second{width:100px; height:100px; background:#030; clear:left;//不容許左邊有浮動對象 }
#third{width:100px; height:100px; background:#93C; float:right;//對象浮在右邊 }