This element uses a tiled background image.
```
## Example
How to horizontally repeat the background image:
```html
div
{
background-color:pink;
background-image:url('paper.gif');
background-repeat:repeat-x;
}
This element uses a horizontally tiled background image.
```
## Example
How to vertically repeat the background image:
```html
div
{
background-color:pink;
background-image:url('paper.gif');
background-repeat:repeat-y;
}
This element uses a vertically tiled background image.
```
## Example
Background image not repeated:
```html
div
{
background-width:pink;
background-image:url('paper.gif');
background-repeat:no-repeat;
}
This element uses a non-tiled background image.
```
## Example
All background-repeat property values:
```html
.ex1 {
background-image: url(w3css.gif);
background-repeat: repeat;
}
.ex2 {
background-image: url(w3css.gif);
background-repeat: no-repeat;
}
.ex3 {
background-image: url(w3css.gif);
background-repeat: repeat-x;
}
.ex4 {
background-image: url(w3css.gif);
background-repeat: repeat-y;
}
.ex5 {
background-image: url(w3css.gif);
background-repeat: space;
}
.ex6 {
background-image: url(w3css.gif);
background-repeat: round;
}
background-repeat Property
repeat: The background image is repeated both vertically and horizontally.
no-repeat: The background-image is only shown once.
repeat-x: The background image is repeated only horizontally.
repeat-y: The background image is repeated only vertically.
space: The background image is repeated as much as possible without clipping.
round: There must be two background images, the image will resize to fill the container.
``` ## ( background-position property]( background-attachment property]( background property]( ```
YouTip