一些布局
嗯,今天重新玩了下布局,把部分布局方式整理了一下,也就順手記了下來。(都測試過了,IE6 +,FF,opera,chromer瀏覽器現(xiàn)在流行的版本都支持)
?
一、三列(固寬)
<div id="container"><div id="sideBar"></div>
<div id="sideBarS"></div>
<div id="content"></div>
</div>
?
#container{margin: 0 auto;
width: 950px;
overflow: auto; /*在使用過程中,IE7有時(shí)候會(huì)出現(xiàn)問題,這時(shí)可把值改為“hidden”,清除浮動(dòng)帶來的問題*/
}
#sideBar,
#sideBarS{
float: left;
width: 250px;
height: 500px;
background-color:#0CF;
}
#sideBarS{
float: right!important;
}
#content{
margin: 0 260px!important;
margin: 0 257px; /*這里主要是為了應(yīng)付IE6*/
height: 500px;
background-color:#06F
}
二、單行單列(高寬均100%)
?
嗯,這種情況不算少用,特別是彈出的DIV塊時(shí)就用到了
?
<div id="container"></div>?
html,body{padding: 0;
margin: 0;
height: 100%;
}
#container{
width: 100%;
height: 100%;
background-color:#06C;
}
轉(zhuǎn)載于:https://www.cnblogs.com/lcq6130/archive/2010/05/28/1746164.html
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
- 上一篇: 【分享】LazyLoad延迟加载(按需加
- 下一篇: 软件开发工具介绍之 1.代码生成器