/

HTML / CSS / JavaScript Tutorial

CSS Property: background-repeat

[this page | pdf | back links]

The CSS (CSS1) background-repeat property sets whether/how a background image will be repeated. By default, a background-image is placed at the top-left corner of an element and is repeated both vertically and horizontally.

 

Valid property values (other than inherit and initial) are:

 

Value

Description

no-repeat

Not repeated

repeat

(default value). Repeated both vertically and horizontally

repeat-x

Repeated only horizontally

repeat-y

Repeated only vertically

 

Default Value:

repeat

JavaScript syntax:

e.g. object.style.backgroundRepeat="repeat-x"

Inherited:

No

Animatable:

No

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile