CSS backgroundrepeat Property (original) (raw)

CSS background-repeat Property

Last Updated : 23 Aug, 2024

The **background-repeat property in CSS is used to repeat the background image both horizontally and vertically. It also decides whether the background-image will be repeated or not.

**Syntax:

background-repeat: repeat|repeat-x|round|space|repeat-y|no-repeat|initial| inherit;

**Default Value: Its default value is initial.

**Property Values:

**Example: In this example, we are using the background-repeat: repeat; property.

HTML `

background-repeat property

GeeksforGeeks

background-repeat: repeat;

`

**Output:

**Example: In this example, we are using the background-repeat: repeat-x; property.

HTML `

background-repeat property

GeeksforGeeks

background-repeat: repeat-x;

`

**Output:

**Example: In this example, we are using the background-repeat: repeat-y; property.

HTML `

background-repeat property

GeeksforGeeks

background-repeat: repeat-y;

`

**Output:

**Example: In this example, we are using the background-image: no-repeat; property.

HTML `

background-repeat property

GeeksforGeeks

background-repeat: no-repeat;

`

**Output:

**Supported Browsers: The browsers supported by _background-repeat property are listed below: