background-repeat Description:
The background-repeat property defines the background image of the element.
background-repeat in CSS Versions:
background-repeat Syntax:
background-repeat: repeat | repeat-x | repeat-y | no-repeat | inherit
- repeat
The standard, repeat horizontally and vertically. - repeat-x
Repeat horizontally only. - repeat-y
Repeat vertially only. - no-repeat
Do not repeat the image, display it only once. - inherit
The element should have the same background-repeat setting as the parent.
background-repeat Initial Value:
repeat
background-repeat Applies To:
All elements.
background-repeat Inheritance:
This property is not inherited.
background-repeat Browser Support:
background-repeat Examples:
Repeat horizontally
<p style="background-repeat : repeat-x; background-image : /library/graphics/purple.gif;">
This paragraph has the purple.gif image as a background repeating horizontally.
</p>
Repeat once
<p style="background-repeat : no-repeat; background-image : /library/graphics/purple.gif;">
This paragraph has the purple.gif image as a background displaying only once.
</p>
background-repeat Special Notes:
- The background-repeat property only reliably works in the <body> tag in many browsers.
- This style requires a background image set.

