asp.net.ph

Skip Navigation LinksAbakada: Back to Basics > Language References > CSS Properties > Color and Background Properties > background-repeat Property

background-repeat Attribute | backgroundRepeat Property


Sets or retrieves whether the object’s background-image is repeated.

Syntax

CSS { background-repeat: 'repeat' | 'no-repeat' | 'repeat-x' | 'repeat-y' }
Script object.style.backgroundRepeat = sRepeat ]

Possible Values

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.

Remarks

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.

Example

The following example demonstrates the effects of changing the various possible values of an object’s background-repeat style attribute.

 Show me 

See Also

background, background-attachment, background-color, background-image, background-position



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note