-
三列布局查看全部
-
<!DOCTYPE html> <html> <head> <title>this is a page</title> <style type="text/css"> body{padding:0; margin:0; } .left{width:200px; height:500px; position:absolute; left:0px; top:0px; background: red;} .middle{height:500px; background: blue; margin:0 310px 0 210px;} .right{width:300px; height:500px; position:absolute; right:0px; top:0px; background: orange;} </style> </head> <body> <div class="left">this is left</div> <div class="middle">this is auto</div> <div class="right">this is right</div> </body> </html>查看全部
-
三列布局: 1, margin:上 右 下 左; margin:0 300px 0 200px; 2,左側固定寬度 中間自適應寬度 右側固定寬度 使用float不能排成一行;使用定位position:absolute; 例:.left{ width:200px;height:500px;background:#ccc; position:absolute; left:0; top:0; } .middle{ height:500px; background:#999; margin:0 300px 0 200px; } .right{ width:300px; height:500px; background:#000; position:absolute; right:0; top:0;}查看全部
-
1.混合布局:我們可以把一列布局加入“左”和“右”改造為混合布局。 2.在中部mian中加入子div 分別是(左,右)。 然后分別在style中加入“.left和.right”的樣式! 3.注“left和right”都要加浮動“float” 4.還可以在混合布局下進行更復雜的混合布局 5.可以將right定義為sub_right和sub_right 分為化為更為密集的混合布局查看全部
-
一列布局: 1,通常作為網站的首頁,一般固定寬度; 2,一列布局不適于存放文本,太長容易看串行。 3,真正開發,高度設置自動的,適于自動撐開;查看全部
-
hjghghhgf查看全部
-
float與position:absolute可讓元素脫離文檔流查看全部
-
sxsxs查看全部
-
網頁中的三種關系 1、塊挨著塊 2、塊嵌套著塊 3、塊疊壓著塊查看全部
-
body{margin:0;padding:0}清除默認樣式 兩列布局:1、寬度自適應(用的比較少),1.1因為寬度要自適應,所以要設置左側left的width:xx%;1.2,需要左右排列,所以設置float:left;1.3另一側right也設置width和float(left和right都可以吧,再微調) 2、固定寬度(☆☆☆☆☆)left和right增加一個父div#main,設置這個main的width,以及margin 0 auto;2.1如果要精確控制left和right的寬度,可以使用px【就是說也可以使用%粗略控制。】查看全部
-
一列布局: 1,通常作為網站的首頁,一般固定寬度; 2,一列布局不適于存放文本,太長容易看串行。 3,真正開發,高度設置自動的,適于自動撐開;查看全部
-
網頁:寬度自適應(百分比),可以無限延長 頁面為:頭部,主體部分,底部。 分欄又稱為分列:一列布局 二列布局 三列布局 以及混合布局(用的最多) 布局通過 浮動和定位來完成查看全部
-
一列布局查看全部
-
疑問:什么事脫離文件流?查看全部
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>混合布局編程挑戰</title> <style type="text/css"> body{ margin:0; padding:0; font-size:30px; color:#fff} .top{height:100px;background:#ddd;} .main{width:800px; height:500px;background:red;position:relative; margin:0 auto;} .left{width:200px;height:500px;background:blue;position:absolute;left:0;} .right{height:500px;background:#9c9;position:absolute;left:210px;right:0;} .foot{height:50px;background:#c80;margin:0 auto;} </style> </head> <body> <div class="top">top</div> <div class="main"> <div class="right">right</div> <div class="left">left</div> </div> <div class="foot">foot</div> </body> </html>查看全部
舉報
0/150
提交
取消