background-repeat版本:CSS1 兼容性:IE4+ NS4+ 繼承性:無
語法:
background-repeat : repeat | no-repeat | repeat-x | repeat-y
取值:
| repeat | :𨪜 | 默認值。背景圖像在縱向和橫向上平鋪 |
| no-repeat | :𨪜 | 背景圖像不平鋪 |
| repeat-x | :𨪜 | 背景圖像僅在橫向上平鋪 |
| repeat-y | :𨪜 | 背景圖像僅在縱向上平鋪 |
說明:
設置或檢索對象的背景圖像是否及如何鋪排。必須先指定對象的背景圖像(
background-image )。
此屬性對於
currentStyle 對像而言是只讀的。對於其他對像而言是可讀寫的。
對應的腳本特性為
backgroundRepeat 。
示例:
menu { background: url("images/aardvark.gif"); background-repeat: repeat-y; }
p { background: url("images/aardvark.gif"); background-repeat: no-repeat; }