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

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

top,foot,main的width不一樣,為什么?

body{ margin:0; padding:0; font-size:30px; color:#fff}

.top{width:100%;margin:0 auto;background:#666}

.main{height:600px;margin:0 auto;background:#F00}

.left{position:absolute;height:600px;width:200px;background:#00C}

.right{height:600px;margin-left:210px;width:100%;background:#6F3;float:left}

.foot{width:100%;margin:0 auto;background:#FF3;clear:both}


正在回答

3 回答

body{ margin:0; padding:0; font-size:30px; color:#fff}

.top{height:100px;background:#CCCCCC;}

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

.left{width:200px;height:500px;background:#0000FE;position:absolute;top:0;left:0;}

.right{height:500px;background:#9ACC99;margin-left:210px;}

.foot{height:50px;background:#FF6634;}


0 回復 有任何疑惑可以回復我~
#1

卟二 提問者

非常感謝!
2016-06-16 回復 有任何疑惑可以回復我~

肯定不一樣,因為你的代碼寫錯了

0 回復 有任何疑惑可以回復我~

照代碼來看top main foot 的寬度不都是100% 么 ?

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
如何用CSS進行網頁布局
  • 參與學習       209566    人
  • 解答問題       1206    個

用最簡潔的案例教你布局的那些知識,這是前端工程師基本技能

進入課程

top,foot,main的width不一樣,為什么?

我要回答 關注問題
微信客服

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

幫助反饋 APP下載

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

公眾號

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