看代码说话吧!
流式布局.html
<!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.css
@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;//对象浮在右边
}