国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

DIV+CSS實現網頁布局實例代碼(1)

2020-03-24 16:59:36
字體:
來源:轉載
供稿:網友
本文我們只是簡單的實現了頁面的布局。在下一文中我們將完成整個頁面。 本文代碼如下: html
head
title div+css實現網頁布局實例代碼 /title style
!--
body{
margin:0px;
text-align:center;
background:#ffffcc;
} #container {
width:800px;
height:1000px;
margin:auto 0px;
} #header {
float:left;
width:800px;
height: 100px;
margin:auto 0px;
background:red;
clear:both;

} #logo {
float:left;
width:250px;
height:90px;
background:green;
clear:right;
margin:opx;
} #banner{
float:right;
width:540px;
height:90px;
margin:0px;
clear:left;
background:blue;
}

#menu {
width:800px;
height:35px;
margin:auto 0px;
clear: both;

}


.nav {
margin:auto 0px;
width:800px;
height:10px;
clear:both;
background:#ffffff;
line-height:10px;
} .nav_a {
float:left;
margin:0px;
width:610px;
height:10px;
clear:both;
background:#ffffff;
line-height:10px;
}

.left_main {
margin:0px;
float:left;
width:610px;
height:420px;
background:red; } .right_main{
margin:0px;
float:right;
width:180px;
height:420px;
background:green;
clear:left;
} .left_a {
margin:0px;
float:left;
width:300px;
height:205px;
background:blue; }
.left_b {
margin:0px;
float:right;
width:300px;
height:205px;
background:blue;
clear:left;
}

.con {
margin:auto 0px;
width:800px;
height:200px;
background:green;
clear:both;

}

.one {
float:left;
width:200px;
height:200px;
background:#ff99f0;
clear:right;
} .two{
float:left;
width:200px;
height:200px;
background:#ffcc00;
} .three {
float:left;
width:200px;
height:200px;
background:#0ffff0;
} .four {
float:right;
width:190px;
height:200px;
background:#f0fff0;
} #footer {
width:800px;
height:100px;
background:red;
margin:auto 0px;
padding-top: 30px;
color: #ffffff;
}
//--
/style
/head
body
div id="container"
div id="header"
div id="logo" /div div id="banner" /div
/div div id="menu" /div
div nav /div

div
div /div
div /div div nav_left /div div /div
div /div
/div
div /div
div nav /div
div
div /div div /div div /div

div /div /div div
div /div
div /div
div nav_left /div
/div
div /div
div nav /div div id="footer" /div
/div /body /htmlhtml教程

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 中西区| 玛曲县| 沁源县| 寿光市| 沙洋县| 牙克石市| 和田市| 开封市| 随州市| 清河县| 镇江市| 中江县| 翁源县| 昌邑市| 葵青区| 平度市| 大同市| 沙雅县| 东海县| 南郑县| 福安市| 沙河市| 舟山市| 昌宁县| 白沙| 济宁市| 龙胜| 石渠县| 墨脱县| 泾源县| 阆中市| 周宁县| 庆城县| 青川县| 和顺县| 宜兰市| 横山县| 札达县| 舟曲县| 普定县| 迁西县|