webmonkey

 

background-repeat

Page history last edited by Nicole M 2 yrs ago

Definition

 

The background-repeat property sets if/how a background image will be repeated.

 

Inherited: No

JavaScript Syntax

 

CSS properties can also be dynamically changed with a JavaScript.

 

Scripting Syntax: object.style.backgroundRepeat="repeat-y"

 

In our HTML DOM tutorial you can find more details about the backgroundRepeat property.

 

In our HTML DOM tutorial you can also find a full Style Object Reference.

Example:

body

{

background-image: url(stars.gif);

background-repeat: repeat-x

}

 

You can also use no-repeat in order to use an image in a div and layer it with another image or text.

 

Example:

#header {

background-image:url(header.png);

background-repeat:no-repeat;

width:700px;

height:300px;

}

Comments (0)

You don't have permission to comment on this page.