CSS:background-image
From MDC
[edit] Summary
The background-image property sets the background image for an element.
- Initial value: none
- Applies to: all elements
- Inherited: no
- Percentages: N/A
- Media:
visual - Computed value: absolute URI or none
[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
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
Categories: CSS Reference | CSS 1 | CSS 2.1 | CSS 3