Visit Mozilla.org

CSS:background-repeat

From MDC

« CSS Reference

[edit] Summary

background-repeat specifies whether the image is repeated (tiled), and how.

[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