Search within TutorialsPark

CSS background-repeat Property


To specify how the background images repeat if smaller than the element


Definition and Notes.

1. The CSS background-repeat property is used to control how the background image repeats(if smaller than the element).

2. By Default, background-images tile from the top-left to bottom-right, filling the background of the element.

3. The keyword space causes the images to be regularly spaced while round makes them to be stretched to touch each other.


Syntax:

CSS background-repeat property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note- If no background-position is given, then the image is placed at the top-left corner.

Attributes

Value Description
repeat To repeat the image both vertically and horizontally to fill entire available space. Its the default
repeat-x To repeat the image horizontally only.
repeat-y The repeat the image vertically only.
no-repeat The display the image only once.
inherit Inherits the value from the parent element.

Specifications

Specs Value
Name background-repeat
Value repeat-x| repeat-y| repeat | no-repeat | none
Initial Value repeat
Applies to all elements.
Javascript syntax object.style.backgroundRepeat="no repeat"
Inherited No
Browser Support internetexplorer safari firefox opera chrome

Related Examples.