margin

英 [?mɑ:d??n]? ?美 [?mɑ:rd??n]??

n.邊緣,范圍;極限;利潤,盈余;(版心外)的空白

vt.留邊;成為…的邊;加邊于,圍繞;為…加旁注

復數(shù): margins

bottom

英 [?b?t?m]? ?美 [?bɑ:t?m]??

n.底部;末端;臀部;盡頭

adj.底部的

vt.裝底;測量深淺;查明真相

vi.到達底部;建立基礎

第三人稱單數(shù): bottoms 復數(shù): bottoms 現(xiàn)在分詞: bottoming 過去式: bottomed 過去分詞: bottomed

javascript marginBottom屬性 語法

作用:設置元素的下外邊距。

語法:Object.style.marginBottom=auto|length|%

參數(shù):auto ? ?瀏覽器設置的一個下外邊距。? ? length ? ?定義一個固定的下外邊距。默認值是 0。? ? % ? ?定義基于父對象總高度的百分比下外邊距。? ??

javascript marginBottom屬性 示例

<html>
<head>
<script type="text/javascript">
function changeMargin()
{
document.getElementById("p1").style.marginBottom="32px";
}
</script>
</head>
<body>

<input type="button" onclick="changeMargin()" 
value="Change the bottom margin of a paragraph" />

<p>This is a paragraph</p>
<p id="p1">This is a paragraph</p>
<p>This is a paragraph</p>

</body>
</html>

運行實例 ?

點擊 "運行實例" 按鈕查看在線實例