A background image can be specified for almost any HTML element.
If the background image is smaller than the element, the image will repeat itself, horizontally and vertically, until it reaches the end of the element:
To avoid the background image from repeating itself, set the background-repeat property to no-repeat.
To make sure the entire element is always covered, set the background-attachment property to
If you want the background image to cover the entire element, you can set the background-size property to cover.
If you want the background image to set in original size of the image, you can set the background-size property to contain.
If you want the background image to stretch to fit the entire element, you can set the background-size property to 100% 100%: