Background Repeat Property
The Background Repeat property determines how the background image will be repeated through the entire webpage body. The width/height of the screen is often larger than the width/height of the background image and this property helps us determine how the image is repeated across the dimensions of the website.
Description
The Background property can take different values based on the design needed
- repeat - Background repeats both horizontally and vertically.
- repeat-x - Background only repeats along the x-axis (horizontally)
- repeat-y - Background only repeats along the x-axis (vertically)
- no-repeat - Background image does not repeat across the webpage.
Syntax :
element {
background-image: url('location_to_img');
backround-repeat: repeat-x;
}
p {
background-image: url("www.pixel.com/cool-images/coolest.jpg");
background-repeat: repeat-x;
}