TA的每日心情 | 开心 2021-3-12 23:18 |
---|
签到天数: 2 天 [LV.1]初来乍到
|
创建一个灵活可变的流动布局能够随着浏览器窗口的大小而伸缩,可以给用户更多的掌控能力。下面我们开始创建一个流动的布局。 xHTML
<div id="wrap">
<div id="header">
<h1>yanglei"s blog</h1>
</div>
<div id="content">
... c9:28 2007-1-29ontent goes here...
</div>
<div id="sidebar">
... sidebar goes here...
</div>
<div id="footer">
...footer....
</div>
</div><!--End wrap-->
css
body {
font-size:small;
font-family:Arial, Helvetica, sans-serif;
line-height:150%
}
#warp {
max-width:1200px;
min-width:600px;
}
.header {
background:#326276;
color:#FFFFFF;
padding:2% 5%;
}
.content {
float:left;
width:65;
margin-right:5%;
}
.sidebar {
float:right;
width:30%;
padding:0 2%;
background:#B7D37C;
}
.footer {
clear:both;
background:#E1EDCB;
height:1%
}
源码下载:http://file.javaxxz.com/2014/10/30/235509671.zip |
|