CSS Background Image Repeat

CSS Background Image Repeat


CSS Background Image Repeat 
The background-repeat property sets if/how a background image will be repeated. 
By default, a background image is repeated both vertically and horizontally. 
Here is an example where an image is repeating both horizontally and vertically by default.
Example  -  Repeat of an image by default.
Output - 
the size of the image is not fit to the body so it will repeat by default here is the sample output -
We can actually repeat an image horizontally or vertically as we will using the following syntax. - 
Property name which is used to change the repetition value is - 
background-repeat :
Now we can change the repetition axis by assigning the following values to the above mentioned property -
background-repeat : repeat-x;

OR

background-repeat : repeat-y; 
Example  -  Using repeat-x value -
Output  - 
Example -  Using repeat-y
Output - 
CSS background-repeat: no-repeat
We can set background repeat value as no-repeat  which means the image will not repeat itself 
Example-
Output -