最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

css3求教各位老師!

css3求教各位老師!

天窗的螞蟻 2016-01-22 11:49:40
<!doctype?html> <html> <head> <meta?charset="utf-8"> <title>盒子模型</title> <style?type="text/css"> h1?{ ??font-size:?20px; ??margin:?0; ??color:?#fff; } #page:after, #page:before{ ??content:""; ??display:?table; } #page:after{ ??clear:both; ??overflow:?hidden; } #page?{ ??margin-bottom:?20px; ??background:black; } #header?{ ??width:?100%; ??background:?green; ??margin-bottom:?10px; ??padding:?20px; } .main?{ ??width:?60%; ??padding:?20px; ??background:?orange; ??float:?left; } .sidebar?{ ??width:?38%; ??float:?right; ??background:?#f36; ??padding:?20px; } #footer?{ ??width:?100%; ??background:?#36f; ??padding:?20px; ??clear:both; } #header, .main, .sidebar, #footer?{ ??-webkit-box-sizing:border-box; ??-moz-?; ??-o-?; ??-ms-?; ???; } </style> </head> <body> <div?id="header"><h1>Header?Content</h1></div> <div?id="page"> ??<div?class="main"><h1>Main?Content</h1></div> ??<div?class="sidebar"><h1>Sidebar?Content</h1></div> </div> <div?id="footer"><h1>Footer?Content</h1></div>?? </body> </html>#page:after和#page:before在#page前面和后面插入一個(gè)空內(nèi)容,為什么要把他們?cè)O(shè)置為display:table;?#page:after{clear:both;overflow: hidden;},這里設(shè)置了clear:both,清楚浮動(dòng)了,為什么#footer還要在設(shè)置一次clear:both呢?但如果我把#footer的clear:both去掉,他和#page(margin-bottom: 20px)之間的20px就沒了?這里也不明白?由于#page里面的.main和.sidebar都浮動(dòng)了,如果#page沒有設(shè)置overflow:hidden,他就應(yīng)該坍塌呀(我給#page加上背景色),但是它并沒有坍塌,是因?yàn)?page:after{overflow:hidden}的原因?怎么影響的?不好意思啊,問題有點(diǎn)多,麻煩大家了!
查看完整描述

1 回答

?
天窗的螞蟻

TA貢獻(xiàn)1條經(jīng)驗(yàn) 獲得超0個(gè)贊

各位老師,沒人愿意幫忙指點(diǎn)一下嗎?

查看完整回答
反對(duì) 回復(fù) 2016-01-23
  • 1 回答
  • 0 關(guān)注
  • 1444 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)