關于為什么出現空白
為什么我在寫這句代碼的前后會出現不同,沒寫padding:100px 0;時有空白,謝啦就沒有空白了
.green-section{
? ? background: #089db0;
? ? color: #ffffff;
? ? text-align: center;
? ? padding: 100px 0;
}
為什么我在寫這句代碼的前后會出現不同,沒寫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表示設置上下內邊距各為100px,因此把你green部分內容整體撐開了。具體請參考里面的盒子模型圖:http://www.studyofnet.com/news/35.html ?