您的位置:首页 > 其它

流式布局(div)

2015-10-06 01:17 218 查看
看代码说话吧!

流式布局.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;//对象浮在右边
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  流式布局 div