-
margin查看全部
-
常見布局查看全部
-
布局排版---報紙 書籍 雜志.. 網頁自適應寬度,理論上可以無限延長!查看全部
-
<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; font-weight:bold} div{ line-height:50px} .left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0} .main{ height:600px; margin:0 310px 0 210px; background:#9CF} .right{ height:600px; width:300px; position:absolute; top:0; right:0; background:#FCC;} </style> </head> <body> <div class="left">left</div> <div class="main">設計首頁的第一步是設計版面布局。就象傳統的報刊雜志編輯一樣,我們將網頁看作一張報紙,一本雜志來進行排版布局。 雖然動態網頁技術的發展使得我們開始趨向于學習場景編劇,但是固定的網頁版面設計基礎依然是必須學習和掌握的。它們的基本原理是共通的,你可以領會要點,舉一反三。</div> <div class="right">right</div> </body> </html>查看全部
-
<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; font-weight:bold} div{ text-align:center; line-height:50px} .main{ width:400px; height:600px; margin:0 auto}/*整體居中*/ .left{ width:100px; height:600px; background:#ccc; float:left;}。/*左浮動樣式*/ .right{ width:300px; height:600px; background:#FCC; float:right;}/*右浮動樣式*/ </style> </head> <body> <div class="main"> <div class="left">left</div> <div class="right">right</div> </div> </body> </html>查看全部
-
浮動(float)和 絕對定位(position:absolute)可以讓元素脫離文檔流。查看全部
-
Div{width:800px; height:500px; margin:0 auto},上面這段樣式,可以讓 div 在頁面的居中對齊查看全部
-
一列布局: margin:0 auto:margin后面如果只有兩個參數的話,第一個表示top和bottom,第二個表示left和right,因為0 auto(自動),表示上下邊界為0,左右則根據寬度自適應相同值(即居中)查看全部
-
布局分類:一列布局、二列布局、三列布局、混合布局查看全部
-
clear:both 清除浮動查看全部
-
三列布局:位置固定 {position:absolute;top:0;left:0;}查看全部
-
布局不要設置高度??!查看全部
-
css 布局,一列布局查看全部
-
1、頂部和底部寬度自適應一般將其設置寬度為百分比,例如width:100% 2、多列中,其中一列需要寬度自適應,不需要加寬度(width)。只需要設置margin值 3、塊的加載順序由HTML代碼編寫順序決定查看全部
舉報
0/150
提交
取消