-
版式布局查看全部
-
文檔流:將窗口自上而下分成一行一行,并在每行中按從左至右的依次排放元素,即為文檔流。 有三種情況使得元素離開文檔流而存在,分別是浮動 絕對布局 固定定位查看全部
-
position:absolute(絕對定位)查看全部
-
混合布局: .left{ width:200px;height:500px;position:absolute;left:0;top:100px;background:blue;} .right{background:#9C9;height:500px;margin-left:210px;} .foot{width:100%;height:50px;background:#F63;clear:both;}查看全部
-
三列固定布局: .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;position:absolute;right:0;top:0; background:#FCC;}查看全部
-
倆列自適應: .main{ width:100%; height:600px; margin:0 auto} .left{ width:38%; height:600px;background:#ccc; float:left;text-align:left; }/*左浮動樣式*/ .right{width:60%;height:600px;background:#FCC;float:right;text-align:left;}/*右浮動樣式*/查看全部
-
一列居中: .main,.footer{ width:500px; margin:0 auto;} 先定寬,再margin:0 auto查看全部
-
可以讓元素脫離文檔流的是:浮動(float)和 絕對定位(position:absolute)查看全部
-
三列布局特殊例子 記得看查看全部
-
文檔流:將窗口自上而下分成一行一行,并在每行中按從左至右的依次排放元素,即為文檔流。查看全部
-
右邊寬度自適應時 左邊要用絕對定位,右邊要用margin-left查看全部
-
使用position:absolute;left:0。讓這個div固定在網頁左邊。查看全部
-
clear:both;是清楚所有浮動效果查看全部
-
單列布局,margain:0 auto 讓body居中查看全部
-
將技術與藝術完美融合,自適應,分欄查看全部
舉報
0/150
提交
取消