Version: Level 1
Compability: IE4+ N4+
-
Syntax:
- background-repeat : repeat | repeat-x | repeat-y | no-repeat
- no-repeat
- The no-repeat value is the default. No tiling occurs. By declaring no-repeat, you can ensure that any previous declaration will not effect a specific imaged.
- repeat-y
- The repeat-y value causes the background image to be tiled vertically (along the y-axis).
- repeat-x
- The repeat-x value causes the background image to be tiled horizontally (along the x-axis).
- repeat
- The repeat value causes the background image to be tiled both vertically and horizontally.
The background-repeat property allows you to repeat a background image vertically and/or horizontally. The repetition of an image is called tiling. This property is not inherited.
Examples
Code:
body {
background: url("images/aardvark.gif");
background-repeat: repeat;
}
pre {
background: url("images/aardvark.gif");
background-repeat: repeat-x;
}
menu {
background: url("images/aardvark.gif");
background-repeat: repeat-y;
}
p {
background: url("images/aardvark.gif");
background-repeat: no-repeat;
}
Language(s):
CSS2
See Also: