CSS:background-repeat
From MDC
[edit] Summary
background-repeat specifies whether the image is repeated (tiled), and how.
- Initial value: repeat
- Applies to: all elements
- Inherited: no
- Percentages: N/A
- Media:
visual - Computed value: as specified
[edit] Syntax
background-repeat: repeat | repeat-x | repeat-y | no-repeat | inherit
[edit] Values
- repeat
- The image is repeated both horizontally and vertically.
- repeat-x
- The image is repeated horizontally only.
- repeat-y
- The image is repeated vertically only.
- no-repeat
- The image is not repeated: only one copy of the image is drawn.
[edit] Examples
.exampleone {
background-image: url("logo.png");
background-repeat: repeat-x;
}
.exampletwo {
background-image: url("logo.png");
background-repeat: no-repeat;
}
[edit] Specifications
[edit] Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 4 |
| Firefox | 1 |
| Netscape | 4 |
| Opera | 3.5 |
[edit] See also
background,
background-attachment,
background-color,
background-image,
background-position,
background-repeat