Name
background-repeat — NN n/a IE 4 CSS 1
Synopsis
Inherited: No
Sets whether a background image (specified with the
background-image attribute) should repeat and if
so, along which axes. You can use repeating background images to
create horizontal and vertical bands.
CSS Syntax
background-repeat: no-repeat | repeat | repeat-x | repeat-y
Value
With a setting of no-repeat, one instance of the
image appears in the location within the element established by the
background-position attribute (default is the
top-left corner). Normal repeats are performed along both axes, but
you can have the image repeat down a single column
(repeat-y) or across a single row
(repeat-x).
Initial Value
repeat
Example
BODY {background-image: url(icon.gif); background-repeat: repeat-y}Applies To
All elements.
Object Model Reference
- IE
[window.]document.all.elementID.style.backgroundRepeat
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access