HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

background-repeat

Description

The background-repeat property for CSS specifies how background images are tiled after they have been sized and positioned.

Syntax

CSS

background-repeat: value;

JS

object.style.backgroundRepeat = "value";

Values

<'background-repeat'> = <repeat-style>#
<repeat-style> = repeat-x | repeat-y | [repeat | space | round | no-repeat]{1,2}
repeat-x

The image is repeated in the horizontal direction as often as needed to cover the background painting area.

repeat-y

The image is repeated in the vertical direction as often as needed to cover the background painting area.

repeat

The image is repeated in the horizontal and vertical direction as often as needed to cover the background painting area.

space

The image is repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area.

round

The image is repeated as often as will fit within the background positioning area. If it doesn't fit a whole number of times, it is rescaled so that it does.

no-repeat

The image is placed once and not repeated in this direction.

Initial

repeat

Examples

1 · no-repeat

2 · repeat

3 · repeat-x

4 · repeat-y

5 · round

6 · space

7 · JS