A background image for a p element:
You can specify background images
for any visible HTML element.
In this example, the background image
is specified for a p element.
By default, the background-image
will repeat itself in the direction(s)
where it is smaller than the element
where it is specified. (Try resizing the
browser window to see how the
background image behaves.)
By default, the background image will repeat itself if it is smaller than the element where it is specified, in this case the body element.
By default, the background image will repeat itself if it is smaller than the element where it is specified, in this case the body element.
Set the background-size property to "cover" and the background image will cover the entire element, in this case the body element.
Set the background-size property to "100% 100%" and the background image will be stretched to cover the entire element, in this case the body element.