關(guān)于為什么出現(xiàn)空白
為什么我在寫這句代碼的前后會出現(xiàn)不同,沒寫padding:100px 0;時有空白,謝啦就沒有空白了
.green-section{
? ? background: #089db0;
? ? color: #ffffff;
? ? text-align: center;
? ? padding: 100px 0;
}
為什么我在寫這句代碼的前后會出現(xiàn)不同,沒寫padding:100px 0;時有空白,謝啦就沒有空白了
.green-section{
? ? background: #089db0;
? ? color: #ffffff;
? ? text-align: center;
? ? padding: 100px 0;
}
2017-02-23
舉報
2017-03-07
padding: 100px 0; 中的100px表示設(shè)置上下內(nèi)邊距各為100px,因此把你green部分內(nèi)容整體撐開了。具體請參考里面的盒子模型圖:http://www.studyofnet.com/news/35.html ?