亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

如何用CSS進行網頁布局

江老實 Web前端工程師
難度初級
時長22分
學習人數
綜合評分9.60
1991人評價 查看評價
9.8 內容實用
9.6 簡潔易懂
9.4 邏輯清晰
這個網站真好
如果right不加float:right;定了百分比也滿不了啊。
.top{width:100%;height:50px;background:blue;}
.main{width:100%;height:60px;background:red;}
.left{ width:10%;height:60px; background:green; float:left;}
.right{ width:10%; height:60px;background:green; float:right;}
.foot{width:100%;height:30px;background:yellow;}
.top{ height:100px;margin:0 auto;background:#CCC;}
.main{ height:500px;background:red;position:relative;}
.left{width:200px;height:500px;background:blue;position:absolute;top:0;left:0;}
.right{height:500px;background:#9DA;margin-left:210px;}
.foot{height:50px;background:#F63;}
.top{ width100%;height:50px;background:#edf1f2;}
main{width:100%;background:red;height:800px;}
left{ width:200px;background:blue;float:left;height:800px;}
right{background:green;margin-left:210px;height:800px;position:absolute;width:100%;}
foot{width100%;height:50px;background:orange;margin:0 auto;}
中間部分直接脫離出來顯示在下方
.top{height:100px;width:100%;background:grey;}
.main{height:300px;background:red;position:relative;}
.left{ height:300px;background:blue;width:200px;position:absolute;left:0;top:0;}
.right{height:300px;margin:0 0 0 210px;background:green;}
.foot{width:100%;height:50px;background:orange;clear:both;}
.main{background:red;overflow:hidden;position:relative;}
.left{ width:200px; height:500px; background:blue;position:absolute;left:0;top:0;}
.right{ margin-left:210px;height:500px; background:#9C9;width:100%;}
.foot{height:50px; background:#F63 }
.top{width:100%;height:100px;background:#BEBEBE;}
.main{height:400px;background:red;}
.left{width:200px;height:400px;background:blue;position:absolute;left:0;top:100px;}
.right{background:#9c9;height:400px;margin-left:210px;}
.foot{width:100%;height:100px;background:#F75000;clear:both;}
老師講的好,片頭真嚇人
.right{margin-left:215px;width:100%;height:600px;background:#01B468;position:absolute;}
.foot{width:100%; height:50px;background:#F75000;}
.top{width:100%; height:100px;background:#BEBEBE;}
.main{width:100%; height:600px;background:#EA0000}
.left{ width:200px;height:600px;background:#0000E3;position:absolute;}
任務1 margin:0 auto} 2 float:left 3 float:right 4 margin:0;padding:0
.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;}搞了半天左右搞反了
310 210 要加單位PX 這樣才能讓空白處出現
課程須知
1.你需要掌握html+css樣式基礎知識 2.有一定的前端實際開發經驗
老師告訴你能學到什么?
1.掌握網頁布局的相關知識 2.能對不同的網頁進行布局結構劃分 3.掌握固定寬度和自適應寬度的實現方法

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消