-
中間用margin來設置上右下左;查看全部
-
position:absoule;left:;...來定位;查看全部
-
body{margin:0;padding:0;}清除默認; margin:0 auto; 居中布局;查看全部
-
一列布局都是固定寬度的;查看全部
-
布局...查看全部
-
常見頁面布局包括:一列布局,兩列布局,三列布局,混合布局。查看全部
-
左右分欄,左側固定,右側自適應查看全部
-
混合布局查看全部
-
<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:160px; height:200px; margin:0 auto} .left{ width:50px; height:200px; background:#ccc; float:left;}/*左浮動樣式*/ .right{ width:110px; height:200px; background:#FCC; float:right;}/*右浮動樣式*/ </style>查看全部
-
<title>一列布局</title> <style type="text/css"> body{ margin:0; padding:0; font-size:30px;} div{ text-align:center; font-weight:bold;} .main,.footer{ width:160px; margin:0 auto;} .head{ width:100%; height:100px; background:#ccc} .main{ height:200px; background:#FCC} .footer{ height:50px; background:#9CF} </style>查看全部
-
<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>查看全部
-
清除浮動有兩種方法:1.clear:both 2.overflow:hidden查看全部
-
float:left(right) {float浮動后面加參數左或者右邊}查看全部
-
margin:0 auto (0這個參數表示上線的距離,auto表示左右的參數)查看全部
-
清除浮動有兩種方法:1.clear:both 2.overflow:hidden查看全部
舉報
0/150
提交
取消