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

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

footer 中加了標簽就會和上一個div中間出現了白色間隔

footer 中加了標簽就會和上一個div中間出現了白色間隔

<!DOCTYPE?html> <html> <head> <meta?charset="utf-8"?/> <meta?name="viewport"?content="initial-scale=1,?user-scalable=0,?minimal-ui"> <link?rel="stylesheet"?href="css/index.css"?/> <script?type="text/javascript"?src="js/index.js"></script> <title></title> </head> <body> <header>網頁頭部</header> <nav> <div?id="computer"?onclick="sziitjx_timeout()"> <img?src="img/laptop.png"> <!-- <h1?id=>修電腦</h1>--> </div> </nav> <nav> <div?id="mobile"?onclick="sziitsw_timeout()"> <img?src="img/mobile1.png"> <!--<h1>修手機</h1>--> </div> </nav> <footer><h3>腳部</h3></footer> </body> </html>?html, ?body?{ ? width:?100%; ? height:?100%; ? margin:?0px; ? padding:?0px; ? ?color:?white; ? ?text-align:center ?} ? ?header?{ ? background-color:?#4CAF50; ? height:?10% ?} ? ?nav?{ ? height:?40%; ? width:?100%; ?} ? ?footer{ ? background-color:?#; ? height:?10%; ? background-color:?#FFC90E; ?} ? ?#computer?{ ? width:?100%; ? height:?100%; ? background-color:?#F36F36; ? margin:?auto; ? ?} ? ?#mobile?{ ? width:?100%; ? height:?100%; ? background-color:?#00A89C; ?} nav?{ ???? ????-webkit-transition:?width?2s,?height?2s,?-webkit-transform?2s;?/*?For?Safari?3.1?to?6.0?*/ ????transition:?width?2s,?height?2s,?transform?2s; ????/*background-color:?#F36F36;*/ } nav:hover?{ ??? ????-webkit-transform:?rotate(180deg);?/*?Chrome,?Safari,?Opera?*/ ????transform:?rotate(180deg); }footer中不寫標簽則全部貼合在一起
查看完整描述

3 回答

已采納
?
雨中的魚L

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


是因為h3標簽有默認的margin值,你可以試試h3{
?? ??? ??? ??? ?margin: 0;
?? ??? ??? ?}?? 就可以了

查看完整回答
反對 回復 2016-08-27
?
PARADISELIN

TA貢獻4條經驗 獲得超0個贊

寫頁面最好加入reset.css或者normalize.css這些重置樣式的層疊樣式表

回到問題

因為h3標簽有默認外邊距 margin 所以會你所說的縫隙

給h3設置margin:0;就不會了

查看完整回答
反對 回復 2016-08-28
  • 3 回答
  • 0 關注
  • 2395 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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