We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
26112023 11.08 (CSS Background Image
3
w Tutorialsy —Exercisesw Servicese§ QO Log in
schools
CSS Background Image
[crv] Looe |
CSS background-image
The background-image property specifies an image to use as the background of an
element.
By default, the image is repeated so it covers the entire element.
Example
Set the background image for a page:
body {
background-image: url("paper.gif”);
?
Example
This example shows a bad combination of text and background image. The text is
hardly readable:
body {
background-image: url("bgdesert. jpg");
nitpsdlmww:vdschools comlessless_hackground_image.asp 626112023 11.08 (CSS Background Image
3
w Tutorialsy —Exercisesw Servicese§ QO Log in
schools
Note: When using a background image, use an image that does not disturb the text.
The background image can also be set for specific elements, like the