CSS Attributes Index Color and Background Attributes
Sets or retrieves whether the object’s background-image is repeated.
CSS |
{ background-repeat: 'repeat' | 'no-repeat' | 'repeat-x' | 'repeat-y' } |
Script |
object.style.backgroundRepeat = sRepeat ] |
repeat |
The image is repeated horizontally and vertically. |
no-repeat |
The image is not repeated. |
repeat-x |
The image is repeated horizontally. |
repeat-y |
The image is repeated vertically. |
The property is read/write with a default value of repeat; the CSS attribute is not inherited.
The repeat-x and repeat-y values make the image repeat horizonally and vertically, respectively, creating a single band of images from one side to the other.
This property may be set together with the other background properties using the background composite property.
The following example demonstrates the effects of changing the various possible values of an object’s background-repeat style attribute.
Show me
background, background-attachment, background-color, background-image, background-position