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

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

如何用CSS進行網頁布局

江老實 Web前端工程師
難度初級
時長22分
學習人數
綜合評分9.60
1991人評價 查看評價
9.8 內容實用
9.6 簡潔易懂
9.4 邏輯清晰
.top{height:100px;background:gray;}

.main{height:500px;background:red;}

.left{width:200px;height:500px;background:blue;float:left;}

.right{width:calc(100% - 210px);height:500px;background:green;float:right;}

.foot{height:50px;width:100%;background:yellow;}
正解
.top{height:100px;background:#ccc;}
.main{background:red;height:600px;}
.left{width:200px;height:600px;position:absolute;left:0;top:100px;background:pink;}
.right{background:green;height:600px;margin:0 0 0 210px;}
.foot{height:100;background:blue;}
.top{height:100px;background:gray;}
.main{height:500px;background:red;margin:0 auto;}
.left{width:200px;height:500px;background:blue;position:absolute;top:100px;left:0;}
.right{height:500px;background:#7D9EC0;margin:0 0 0 210px;}
.foot{height:100px;background:#FF8C00;clear:both;}
body{ margin:0; padding:0; font-size:30px; font-weight:bold}
div{ line-height:50px}
.left{ width:200px; height:600px; background:#ccc; float:left;}

.main{ height:600px; background:#9CF; margin-right:300px}

.right{ height:600px; width:300px; background:#FCC; position: absolute;top:0;right:0}也可以
思維不活躍不行啊 margin:0 310px 0 210px;
突然變大聲,嚇死
劉易明要好好學習改變自己要不負眾望

最新回答 / 慕移動9181930
利用顏色的16位進制代碼加#號轉化成顏色你說的系統是指?提出來,共同研究
要求右側(right)先加載,左側(left)后加載.
這句話就是html結構中
<div class="main">
<div class="right">right</div>
<div class="left">left</div>
</div>
上面的帶碼有沒有發現在 先寫的right后寫的 left,
因為代碼是順序執行的,所以也就是題目要求中的 右側(right)先加載,左側(left)后加載
.top{height:60px;background-color:#eee;}
.main{height:600px;background-color:red;}
.left{float:left;width:20%;height:600px;background-color:blue;}
.right{float:right;width:75%;background-color:#9acc99;height:600px;}
.foot{height:25px;background:#ff6634;}
.top{height:100px;width:100%;background:#d3d3d3;}
.main{height:600px;width:100%;background:red;}
.left{height:600px;width:200px;background:blue;position:absolute;top:100px;left:0;}
.right{height:600px;background:#90ee90;margin-left:210px;}
.foot{height:50px;width:100%;background:#ff4500;}
這一節真的沒懂啊。。。。
第10行的花括號害我糾錯改了半天,出來效果了還是挺高興的!效果圖確實中間不該有空隙
課程須知
1.你需要掌握html+css樣式基礎知識 2.有一定的前端實際開發經驗
老師告訴你能學到什么?
1.掌握網頁布局的相關知識 2.能對不同的網頁進行布局結構劃分 3.掌握固定寬度和自適應寬度的實現方法

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消