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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

css的知識

css的知識

qiqiqiqi010629 2015-12-16 14:18:09
<!doctype html><html>? ? <head>? ? ? ? <meta charset="UTF-8">?? ? ? ? <style>? ? ? ? ? ? header{height:150px;background:#ABCDEF;} nav{height:30px;background:#FF0;margin-bottom:0px;} div{height:700px;margin-top:15px;} section{height:700px;width:70%;background:#ABCDEF;float:left;} aside{height:700px;width:28%;background:#ABCDEF;float:right;} footer{height:100px;background:#ABCDEF;clear:both;margin-top:15px;}? ? ? ? </style>? ? </head>? ? <body>? ? ? ? <header>? ? ? ? ? ? <p>這是一個頭標簽</p>? ? ? ? ? ? <nav></nav>? ? ? ? </header>? ? ? ? <div>? ? ? ? ? ? <section>? ? ? ? ? ? ? ? <p>這是一個section頭標簽</p>? ? ? ? ? ? </section>? ? ? ? ? ? <aside>? ? ? ? ? ? ? ? <p>這是一個aside標簽</p>? ? ? ? ? ? </aside>? ? ? ? </div>? ? ? ? <footer>? ? ? ? ? ? <p>這是一個footer標簽</p>? ? ? ? </footer>? ? </body></html>上述代碼中nav標簽里設置css樣式,用margin-bottom:不起作用為什么,margin-top:就有用這又是為什么
查看完整描述

1 回答

已采納
?
RockenRoll

TA貢獻35條經驗 獲得超13個贊

因為你這個nav是在header里面的,margin-bottom:0px這個是距離哪里為0px?

</header>
??????? <nav></nav>
??????? <div>

你寫成這樣就有了

查看完整回答
反對 回復 2015-12-16
  • 1 回答
  • 0 關注
  • 1518 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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