99亚洲_成人性视频免费网站_av在线播放网址_免费成人在线网站_亚洲综合婷婷_亚洲一区二区国产

訂閱本欄目 RSS您所在的位置: 深山工作室 > DIV+CSS > 正文

CSS常用網(wǎng)站布局實(shí)例

51add.com 2008/4/24 23:24:18 深山行者 字體: 瀏覽 8594
CSS常用網(wǎng)站布局實(shí)例
單行一列
以下是引用片段:
body { margin: 0px; padding: 0px; text-align: center; } 
#content { margin-left:auto; margin-right:auto; width: 400px; width: 370px; } 

兩行一列
以下是引用片段:
body { margin: 0px; padding: 0px; text-align: center;} 
#content-top { margin-left:auto; margin-right:auto; width: 400px; width: 370px;} 
#content-end {margin-left:auto; margin-right:auto; width: 400px; width: 370px;}

三行一列
以下是引用片段:
body { margin: 0px; padding: 0px; text-align: center; } 
#content-top { margin-left:auto; margin-right:auto; width: 400px; width: 370px; } 
#content-mid { margin-left:auto; margin-right:auto; width: 400px; width: 370px; } 
#content-end { margin-left:auto; margin-right:auto; width: 400px; width: 370px; } 

單行兩列
以下是引用片段:
#bodycenter { width: 700px;margin-right: auto; margin-left: auto;overflow: auto; } 
#bodycenter #dv1 {float: left;width: 280px;} 
#bodycenter #dv2 {float: right;width: 410px;} 

兩行兩列
以下是引用片段:
#header{ width: 700px; margin-right: auto;margin-left: auto; overflow: auto;} 
#bodycenter { width: 700px; margin-right: auto; margin-left: auto; overflow: auto; } 
#bodycenter #dv1 { float: left; width: 280px;} 
#bodycenter #dv2 { float: right;width: 410px;}

三行兩列
以下是引用片段:
#header{ width: 700px;margin-right: auto; margin-left: auto; } 
#bodycenter {width: 700px; margin-right: auto; margin-left: auto; } 
#bodycenter #dv1 { float: left;width: 280px;} 
#bodycenter #dv2 { float: right; width: 410px;} 
#footer{ width: 700px; margin-right: auto; margin-left: auto; overflow: auto; } 

單行三列
絕對(duì)定位
以下是引用片段:
#left { position: absolute; top: 0px; left: 0px; width: 120px; } 
#middle {margin: 20px 190px 20px 190px; } 
#right {position: absolute;top: 0px; right: 0px; width: 120px;} 

float定位一
xhtml:
以下是引用片段:
<div id="warp"> 
<div id="column"> 
<div id="column1">這里是第一列</div> 
<div id="column2">這里是第二列</div> 
<div class="clear"></div> 
</div> 
<div id="column3">這里是第三列</div> 
<div class="clear"></div> 
</div> 

CSS:
以下是引用片段:
#wrap{ width:100%; height:auto;} 
#column{ float:left; width:60%;} 
#column1{ float:left; width:30%;} 
#column2{ float:right; width:30%;} 
#column3{ float:right; width:40%;} 
.clear{ clear:both;} 

float定位二
xhtml:
以下是引用片段:
<div id="center" class="column"> 
<h1>This is the main content.</h1> 
</div> 
<div id="left" class="column"> 
<h2>This is the left sidebar.</h2> 
</div> 
<div id="right" class="column"> 
<h2>This is the right sidebar.</h2> 
</div> 

CSS:
以下是引用片段:
body {margin: 0;padding-left: 200px;padding-right: 190px;min-width: 240px;} 
.column {position: relative;float: left;} 
#center {width: 100%;} 
#left {width: 180px; right: 240px;margin-left: -100%;} 
#right {width: 130px;margin-right: -100%;} 

兩行三列
xhtml:
以下是引用片段:
<div id="header">這里是頂行</div> 
<div id="warp"> 
<div id="column"> 
<div id="column1">這里是第一列</div> 
<div id="column2">這里是第二列</div> 
<div class="clear"></div> 
</div> 
<div id="column3">這里是第三列</div> 
<div class="clear"></div> 
</div> 

CSS:
以下是引用片段:
#header{width:100%; height:auto;} 
#wrap{ width:100%; height:auto;} 
#column{ float:left; width:60%;} 
#column1{ float:left; width:30%;} 
#column2{ float:right; width:30%;} 
#column3{ float:right; width:40%;} 
.clear{ clear:both;} 

三行三列
xhtml:

以下是引用片段:
<div id="header">這里是頂行</div> 
<div id="warp"> 
<div id="column"> 
<div id="column1">這里是第一列</div> 
<div id="column2">這里是第二列</div> 
<div class="clear"></div> 
</div> 
<div id="column3">這里是第三列</div> 
<div class="clear"></div> 
</div> 
<div id="footer">這里是底部一行</div> 

CSS:
以下是引用片段:
#header{width:100%; height:auto;} 
#wrap{ width:100%; height:auto;} 
#column{ float:left; width:60%;} 
#column1{ float:left; width:30%;} 
#column2{ float:right; width:30%;} 
#column3{ float:right; width:40%;} 
.clear{ clear:both;} 
#footer{width:100%; height:auto;} 

PS:這里列出的是常用的例子,而非研究之用,對(duì)一每個(gè)盒子,都沒(méi)有設(shè)置margin,padding,boeder等屬性!
后一頁(yè):CSS選擇符詳解
相關(guān)閱讀
jquery實(shí)現(xiàn)移動(dòng)端下拉加載刷新更多信息
利用JAVAscript實(shí)現(xiàn)表格漸變
請(qǐng)勿在本地站發(fā)布亂七八糟的廣告,本站所有的留言與評(píng)論全是需要審核的
可以生成跟QQ菜單一樣的生成器
深山留言板(激情圣誕集合五套模板)v4.4
初學(xué)入門:一組常用的彈出窗口用法總結(jié)
提交按鈕在自定時(shí)間內(nèi)灰色不可用
網(wǎng)站頁(yè)面設(shè)計(jì)中的Css十大注意
共有0條關(guān)于《CSS常用網(wǎng)站布局實(shí)例》的評(píng)論
發(fā)表評(píng)論
正在加載評(píng)論......
返回頂部發(fā)表評(píng)論
呢 稱:
表 情:
內(nèi) 容:
評(píng)論內(nèi)容:不能超過(guò) 1000 字,需審核,請(qǐng)自覺(jué)遵守互聯(lián)網(wǎng)相關(guān)政策法規(guī)。
驗(yàn)證碼: 驗(yàn)證碼 
網(wǎng)友評(píng)論聲明,請(qǐng)自覺(jué)遵守互聯(lián)網(wǎng)相關(guān)政策法規(guī)。

您發(fā)布的評(píng)論即表示同意遵守以下條款:
一、不得利用本站危害國(guó)家安全、泄露國(guó)家秘密,不得侵犯國(guó)家、社會(huì)、集體和公民的合法權(quán)益;
二、不得發(fā)布國(guó)家法律、法規(guī)明令禁止的內(nèi)容;互相尊重,對(duì)自己在本站的言論和行為負(fù)責(zé);
三、本站對(duì)您所發(fā)布內(nèi)容擁有處置權(quán)。

更多信息>>欄目類別選擇
百度小程序開(kāi)發(fā)
微信小程序開(kāi)發(fā)
微信公眾號(hào)開(kāi)發(fā)
uni-app
asp函數(shù)庫(kù)
ASP
DIV+CSS
HTML
python
更多>>同類信息
jquery設(shè)置或獲取修改classname
利用css3.0寫出一個(gè)音樂(lè)播放的唱片碟盤的效果
利用css中的scale()實(shí)現(xiàn)放大縮小效果
利用background-color:#000000a8在背景顏色16進(jìn)制代碼之后加字母加上數(shù)字讓背景色透明
css背景使用base64編碼或者將base64編碼放在img圖片標(biāo)簽中
利用css3中的-webkit-font-smoothing把網(wǎng)頁(yè)文字的毛邊去掉
更多>>最新添加文章
dw里面查找替換使用正則刪除sqlserver里面的CONSTRAINT
Android移動(dòng)端自動(dòng)化測(cè)試:使用UIAutomatorViewer與Selenium定位元素
抖音直播音掛載小雪花 懂車帝小程序
javascript獲取瀏覽器指紋可以用來(lái)做投票
火狐Mozilla Firefox出現(xiàn):無(wú)法載入您的Firefox配置文件 它可能已經(jīng)丟失 或是無(wú)法訪問(wèn) 問(wèn)題解決集合處理辦法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路徑
python通過(guò)代碼修改pip下載源讓下載庫(kù)飛起
python里面requests.post返回的res.text還有其它的嗎
更多>>隨機(jī)抽取信息
ASP網(wǎng)站打開(kāi)特別卡 提示:msxml3.dll 錯(cuò)誤 '80072ee2' /LM/W3SVC/670931603/Root/global.asa解決辦法
微信小程序開(kāi)發(fā)中鏈接navigateTo與redirectTo的對(duì)比說(shuō)明
chrome谷歌瀏覽器中的谷歌翻譯有問(wèn)題一鍵修復(fù)處理
非常酷的javascript實(shí)現(xiàn)萬(wàn)年歷功能
純div+css制作的彈出菜單-02
CSS教程:CSS偽類屬性
主站蜘蛛池模板: 麻豆产精国品免费入口 | 97精品国产97久久久久久粉红 | 999精品一区 | 4438x成人网最大色成网站 | 一级毛片免费看 | 一级片黄色免费 | 中文字幕在线影院 | 黄色片网站免费观看 | 成年女人在线观看 | 久久老妇| 91 在线观看| 日韩成人在线观看视频 | 欧美日韩一区二区视频在线观看 | 精品久久久久久久人人人人传媒 | 欧美男人天堂 | 欧美成人精品激情在线观看 | 欧美日韩精品久久久免费观看 | 最近日本韩国高清免费观看 | 九九av | 69久久夜色精品国产69乱www | 自拍偷拍视频网站 | 国产婷婷精品av在线 | 日韩精品一区二区三区四区五区 | 美日韩一区 | 日韩欧美二区 | 日韩精品在线观看视频 | 日韩免费在线观看 | 在线欧美视频 | 色网站在线免费观看 | 一区二区三区回区在观看免费视频 | 亚洲成人av在线 | 懂色av一区二区三区免费观看 | 在线国产精品一区 | 黄在线看 | 久久久久av| 精品福利一区二区三区 | 99久久精品一区二区成人 | 精品久久一二三区 | 黄色的视频免费看 | 国产综合视频 | 一区视频|