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

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

沒加clear:both為什么一樣能出效果是我的代碼錯誤了嗎

下面是代碼:

<style type="text/css">

body{

font-style:italic;

margin:0;

padding:0;

font-size:15px;

}

div{

text-align:center;

line-height:30px;

}

.top{

height:50px;background:#09C;

}

.head{

width:600px;

height:50px;

background:#C33;

margin:0 auto;

}

.main{

margin:0 auto;

background:#00F;

width:600px;

height:700px;

}

.left{

width:150px;

height:700px;

float:left;

background:#6CF;

}

.right{

width:450px;

height:700px;

float:right;

background:#C36;

}

.sub_left{

width:225px;

height:700px;

background:#99C;

float:left;

}

.sub_right{

width:225px;

height:700px;

background:#3FC;

float:right;

}

.footer{

height:50px;

background:#F00;

}

</style>

下面是div:

<div class="top">

? ? <div class="head">head</div>

</div>

<div class="main">

? ? <div class="left">left</div>

? ? <div class="right">

? ? <div class="r_sub_left">sub_left

? ? ? ? </div>

? ? ? ? <div class=" r_sub_right">sub_right

? ? ? ? </div>

? ? </div>

</div>

<div class="footer">footer</div>


正在回答

舉報

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

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

進入課程

沒加clear:both為什么一樣能出效果是我的代碼錯誤了嗎

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

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

幫助反饋 APP下載

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

公眾號

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