Visit Mozilla.org

CSS:background-image

From MDC

« CSS Reference

[edit] Summary

The background-image property sets the background image for an element.

[edit] Syntax

background-image: uri | none | inherit

[edit] Values

uri 
The location of the image resource to be used as a background image.
none 
Used to specify that an element is to have no background image.

[edit] Examples

View Live Examples

body { background-image: url("images/darkpattern.png"); }

p { background-image: none; }

[edit] Notes

Developers should ensure that they specify a background-color to be used if an image is not available. Background images are rendered on top of the background color.

[edit] Specifications

[edit] Browser Compatibility

[edit] Browser Compatibility

Browser Lowest Version
Internet Explorer 4
Firefox 1
Netscape 4
Opera 3.5

[edit] See Also

background, background-attachment, background-color, background-image, background-position, background-repeat