Css-margin-bottom
提供:Dev Guides
CSS-マージン底
説明
_margin-bottom_プロパティは、要素の下部のマージンの幅を設定します。
可能な値
- length -長さの値。
- percentage -マージンの幅は、要素の包含ブロックの幅に対して計算されます。
- auto -デフォルト、ブラウザにマージンを自動的に設定させます。
に適用されます
すべてのHTML要素。
DOM構文
object.style.marginBottom = "5px"
例
ここに例があります-
<html>
<head>
</head>
<body>
<p style = "margin-bottom: 15px; border:1px solid black;">
This is a paragraph with a specified bottom margin
</p>
<p style = "margin-bottom: 5%; border:1px solid black;">
This is another paragraph with a specified bottom margin in percent
</p>
</body>
</html>
これにより、次の結果が生成されます–