-
最后的footer要采用clear:both;清除兩邊的浮動查看全部
-
000查看全部
-
margin:0auto;查看全部
-
.left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0} .main{ height:600px; margin:0 305px 0 205px; background:#9CF} .right{ height:600px; width:300px; position:absolute; top:0; right:0; background:#FCC;}查看全部
-
flaot:left; flaot:right;查看全部
-
margin:0 auto;查看全部
-
浮動后面的元素如果不清除浮動, 就會當前面的元素不存在而占用其位置. 本例中main未設置高度,footer未清除浮動其css效果就會占用main位置 清除浮動方式: clear:both overflow:hidden 在有些情況下只能是用overflow:hidden來清除浮動查看全部
-
right沒加100%查看全部
-
111111111111111查看全部
-
123查看全部
-
混合布局查看全部
-
jiayou查看全部
-
三列布局: 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;}查看全部
-
去掉 text-align:center;查看全部
-
兩列布局: 1,清除默認樣式:*{ margin:0; padding:0; } 2,寬度自適應的,按照%來設置( 如:left:20%; right:80%;); 3,通常情況下,都是寬度固定的兩列布局;查看全部
舉報
0/150
提交
取消