margin
英[?mɑ:d??n]? ?美[?mɑ:rd??n]??
#n.邊緣,範(fàn)圍;極限;利潤,盈餘;(版心外)的空白
vt.留邊;成為…的邊;加邊於,圍繞;為…加旁注
複數(shù): margins
bottom
英[?b?t?m]? ?美[?bɑ:t?m]??
n.底部;末端;臀部;盡頭
#adj.底部的
vtt .裝底;測(cè)量深淺;找出真相
vi.到達(dá)底部;建立基礎(chǔ)
第三人稱單數(shù): bottoms 複數(shù): bottoms 現(xiàn)在分詞: bottoming 過去式: bottomed 過去分詞: bottomed
javascript marginBottom屬性 語法
作用:設(shè)定元素的下外邊距。
語法:Object.style.marginBottom=auto|length|%
參數(shù):auto ? ?瀏覽器設(shè)定的一個(gè)下外側(cè)邊距。? ? length ? ?定義一個(gè)固定的下外邊距。預(yù)設(shè)值是 0。? ? % ? ?定義基於父物件總高度的百分比下外邊距。? ??
#javascript marginBottom屬性 範(fàn)例
<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í)行實(shí)例 ?
點(diǎn)擊 "執(zhí)行實(shí)例" 按鈕查看線上實(shí)例