如何設定一個元素的下邊距?
margin-bottom 屬性用於設定元素的下邊距。它可以是長度、% 或自動的值。
示例
您可以嘗試執行以下程式碼來設定下邊距
<html> <head> </head> <body> <p style = "margin-bottom: 40px; border:2px solid yellow;"> Cricket crazy nation India! </p> <p style = "margin-bottom: 20%; border:2px solid yellow;"> Cricket crazy nation Australia! </p> </body> </html>
廣告