css background-repeat
說明:
設置或檢索對象的背景圖像是否及如何鋪排。必須先指定對象的背景圖像。
對應的腳本特性為backgroundRepeat。請參閱我編寫的其他書目。
語法:
background-repeat : repeat | no-repeat | repeat-x | repeat-y
參數:
repeat : 背景圖像在縱向和橫向上平鋪
no-repeat : 背景圖像不平鋪
repeat-x : 背景圖像在橫向上平鋪
repeat-y : 背景圖像在縱向平鋪
示例:
menu { background: url("images/aardvark.gif"); background-repeat: repeat-y; }
p { background: url("images/aardvark.gif"); background-repeat: no-repeat; }