margin

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

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

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

複數(shù): margins

bottom

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

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

#adj.底部的

vtt .裝底;測量深淺;找出真相

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>

執(zhí)行實例 ?

點擊 "執(zhí)行實例" 按鈕查看線上實例