background-repeat

Browser Internet Explorer Netscape Opera Safari Firefox
Version 5.5 6.0 7.0 8.0 8.0 9.0 7.0 8.0 9.2 9.5 1.3 2.0 3.1 1.5 2.0 3.0
Supported Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Short information
CSS CSS1
Default value repeat
Inherited No
Applied To all elements
HTML analog No
Reference to specification http://www.w3.org/TR/CSS21/colors.html#propdef-background-repeat
Description
This parameter determines replications of a background image that was installed with the help of background-image and on which axis. You can determine image replication only horizontally, vertically or both.

Syntax

background-repeat: no-repeat | repeat | repeat-x | repeat-y
Arguments
no-repeat
Install only one background image in the element without replications. Its location determines by the attribute background-position (default in a top left corner)
repeat
Background image is repeated horizontally and vertically.
repeat-x
Background image is repeated only horizontally.
repeat-y
Background image is repeated only vertically

Example

 
<!--
   BODY { 
    background-color: #bac89a; /* Background color */
    background-image: url(images/gradient.png); /* Path to the background image */
    background-repeat: repeat-x; /* Repeat the background  across*/
   }
 
-->
 
...
Object model
[window.]document.getElementById("elementID").style.backgroundRepeat