Syntax | selector {background-repeat: value;}
|
---|---|
Usage | The background-repeat property is used to specify if, and how, the element's background image will repeat. The background image can repeat horizontally, vertically, in both directions, or not at all. This property is specified by using a keyword according to the syntax shown above. CSS Example: The background-repeat property is set for the image to repeat horizontally and vertically. body {background-image: url("../images/floatingball.gif");
background-repeat: repeat;
} CSS Example: The background-repeat property is set for the image to repeat horizontally. body {background-image: url("../images/floatingball.gif");
background-repeat: repeat-x;
} |
Keywords |
|
Applies To | All elements |
Inherited | No |
Initial Value | repeat |