文章詳情頁
居中,height和line-height區別,分別定義那個屬性
瀏覽:112日期:2022-10-22 18:41:09
問題描述
<h3 style="text-align: center;background: pink;height: 50px;line-height: 50px;">居中</h3>
</body>
問題解答
回答1:height 是定義元素高度,line-height是定義行高(指文字、基線之間的距離)相關文章:
1. css - 為何flex的align-items: center無法垂直居中?2. css3 - 如何用CSS實現垂直排列的多個元素自適應居中3. html - 【css】讓div居中的方法失效了,我該如何改?(在不用css3和表格的情況下)。謝謝。4. javascript - html中這兩種方式為什么都不能讓<p>標簽居中?5. css3 - 如何讓div中的內容水平居中,垂直居中6. css3 - css flex 子元素居中7. 為什么寫了居中命令但是chrome瀏覽器打開顯示沒有居中,Email類型也不會提示8. transform - css3 translate 的水平垂直居中問題求解9. css3 - img垂直水平居中問題10. 移動端頁面文字垂直居中兼容性問題
排行榜
