The background-repeat property defines the background image of the element.
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.
repeat
All elements.
This property is not inherited.
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>
- The background-repeat property only reliably works in the <body> tag in many browsers.
- This style requires a background image set.

