margin
英 [?mɑ:d??n]? ?美 [?mɑ:rd??n]??
n.邊緣,范圍;極限;利潤,盈余;(版心外)的空白
vt.留邊;成為…的邊;加邊于,圍繞;為…加旁注
復(fù)數(shù): margins
right
英 [ra?t]? ?美 [ra?t]??
adv.立刻,馬上;向右,右邊;恰當(dāng)?shù)?一直
adj.正確的;合適的;右方的;好的,正常的
n.權(quán)利;右邊;正確,正當(dāng);右手
vt.糾正;扶直,使正;整理;補(bǔ)償
vi.(船舶等)復(fù)正,恢復(fù)平穩(wěn)
第三人稱單數(shù): rights 復(fù)數(shù): rights 現(xiàn)在分詞: righting 過去式: righted 過去分詞: righted
javascript marginRight 屬性 語法
作用:設(shè)置元素的右外邊距。
語法:Object.style.marginRight=auto|length|%
參數(shù):auto ? ?瀏覽器設(shè)置的外右邊距。? ? length ? ?定義固定的外右邊距。默認(rèn)值是 0。? ? % ? ?定義基于父對象總高度的百分比外右邊距。? ??
javascript marginRight 屬性 示例
<html> <head> <style type="text/css"> p { text-align: right } </style> <script type="text/javascript"> function changeMargin() { document.getElementById("p1").style.marginRight="32px"; } </script> </head> <body> <input type="button" onclick="changeMargin()" value="Change the right 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>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例