求加黑段怎么理解?!
<style type="text/css">
body{ margin:0; padding:0; font-size:30px}
div{ text-align:center; font-weight:bold}
.main,.footer{ width:20%;margin:0 auto;}
.head{ width:100%; height:100px; background:#ccc}
.main{ height:600px;width:60% ;background:#FCC}
.footer{ height:50px;width:60%; background:#9CF}
2016-05-23
不會吧,這個是 就近原則還有優先級的,優先級怎么計算前面課程有的,你可能對之前學習的知識沒有掌握。
2016-05-23
div{ text-align:center; font-weight:bold}這就話的意思是將 div 這個塊水平居中顯示,在div中的文字要加粗
.main,.footer{ width:20%;margin:0 auto;}這句的意思是main ?與footer這兩部分的寬度占整個屏幕的20%,并且也要居中顯示。
2016-05-23
文字居中顯示,字體為黑體
main和footer區域寬度為瀏覽器寬度的20%,邊距上下為0,居中顯示