Background Repeat in CSS
The background-repeat Property
The background-repeat property specifies how background images are repeated. A background image can be repeated along the x-axis or the y-axis or it can be both axes, or not repeated at all. Setting the property value to inherit, will inherit the property of its parent.
Syntax:-
Its syntax is:-
< style >
element{
background-repeat: repeat| repeat-x| repeat-y| no-repeat| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
repeat | The background image is repeated both vertically and horizontally. |
repeat-x | The background image is repeated only horizontally |
repeat-y | The background image is repeated only vertically |
no-repeat | The background-image is not repeated. |
space | The background-image is repeated as much as possible without clipping. |
round | The background-image is repeated and squished or stretched to fill the space. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |