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

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

如何用CSS進行網頁布局

江老實 Web前端工程師
難度初級
時長22分
學習人數
綜合評分9.60
1991人評價 查看評價
9.8 內容實用
9.6 簡潔易懂
9.4 邏輯清晰
要求右側(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行的花括號害我糾錯改了半天,出來效果了還是挺高興的!效果圖確實中間不該有空隙
為什么最終效果沒有背景顏色了
.top{height:200px;background:#ccc;}
.main{height:800px;background:red;}
.left{height:800px;width:200px;position:absolute;left:0;top:200px;background:blue;}
.right{height:800px;background:#0EE;margin-left:210px;}
.foot{height:100px;background:#F03;clear:both;}
多嘗試一下,就OK!
最后給footer清除浮動就好,main的高度不用設置,自然會撐起來。
.top{width:100%;height:100px;background-color:#0F9}
.main{width:100%;height:800px;}
.left{width:200px;height:800px;position:absolute;left:0;top:100px;background-color:#906}
.right{height:800px;margin-left:-200px;background-color:#FF0}
.foot{width:100%;height:100px;background-color:#F6C}
就喜歡這樣的老師
講的確實不錯,如果能從大一開始就好好學習就好了,可惜我要畢業了
這一節失敗之處是沒有效果圖。。。讓小白無從下手
愛上老師的講課方法
課程須知
1.你需要掌握html+css樣式基礎知識 2.有一定的前端實際開發經驗
老師告訴你能學到什么?
1.掌握網頁布局的相關知識 2.能對不同的網頁進行布局結構劃分 3.掌握固定寬度和自適應寬度的實現方法

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消