我認爲這是一個非常簡單的CSS問題,但我不知道如何解決它。h1之前的空行
爲什麼在< h1>之前有空行,以及如何刪除它(如果可能,沒有設置邊距和行高)?謝謝!
<style>
.box-green { background-color: #CCC; }
.box-empty { height: 50px; }
</style>
<div class="box-empty box-green"></div>
<div class="box-green">
<h1>There is an empty line before h1, why?</h1>
</div>
編輯:
結果:http://tinkerbin.com/u6eB0PFQ
添加一個工作代碼輸出或撥弄 – Aravind
我張貼工作代碼,只需複製和粘貼。小提琴不顯示相同的結果。 – iForests