CSS Background-Repeat Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

Used to determine if the image specified in the background-image property is repeated on the page.

Syntax

background-repeat: [value] ;

Possible values

  • repeat (repeating the image horizontally and vertically.)
  • repeat-x (repeating the image horizontally only.)
  • repeat-y (repeating the image vertically only.)
  • no-repeat (background is not repeated.)
  • inherit

Initial Value

repeat

Applies To

All elements

Inherited

No

Media

Visual

Example

body {
  background-image: url(/img/myimage.jpg);
  background-repeat: no-repeat;
  background-position: 30% 80%;
}


View All CSS Properties