The background-image property designates an image to be utilized as the background of an element.
By default, the image is tiled to cover the entire element.
Apply a background image to a page.
body { background-image: url(“paper.gif”); } |
This example presents an unfavorable pairing of text and background image, resulting in poor readability of the text.
body { background-image: url(“bgdesert.jpg”); } |
Please be advised: When employing a background image, ensure that the image does not disrupt the legibility of the text. |
p { background-image: url(“paper.gif”); } |
Property |
Description |
background image |
Defines the background color of an element. |