basics of website design banner photo

HTML

HTML 5

CSS 2.1

CSS 3

Reference



CSS background-repeat Property

The background-repeat property sets whether a background image which has been added to an element repeats or not and the direction and coverage of the repeated image.

Possible Values

  • repeat - the image is repeated horizontally and vertically - the default value.
  • repeat-x - the image is only repeated horizontally.
  • repeat-y - the image is only repeated vertically.
  • no-repeat - the image is not repeated at all - only displayed once.
  • inherit - the value of background-repeat is inherited from the parent element.

Here are some examples of the background-repeat property in action using this image: individual image used in background-repeat examples

1.background-repeat not set or having the value repeat


2.background-repeat property with the value repeat-x


3.background-repeat property with the value repeat-y


CSS 2.1 Property List