Difference between revisions of "CSS GUIDE BACKGROUND IMAGE"
(→Specification Conformance) |
(revert) |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
== Syntax == | == Syntax == | ||
− | + | <pre>TARGET_ELEMENT {background-image: value ;}</pre> | |
+ | |||
== Legal Values == | == Legal Values == | ||
− | <table border=" | + | <table border="0"> |
<tr> | <tr> | ||
<td>'''url'''</td><td>''A URL path to an image file to be used as the background image.''</td> | <td>'''url'''</td><td>''A URL path to an image file to be used as the background image.''</td> | ||
Line 28: | Line 29: | ||
== Mozilla Recommended Values == | == Mozilla Recommended Values == | ||
+ | It is strongly recommended that developers should specify a background-color to be used if a given image is not available. This is similar to placing alternate text for images.t available. Background images are rendered in the foreground (i.e on top of the background color). This should be considered when using images with transparent background. | ||
== Usage Examples == | == Usage Examples == | ||
Line 36: | Line 38: | ||
== Notes == | == Notes == | ||
− | + | See [[#Mozilla Recommended Values | Mozilla Recommended Values]] section. | |
== Specification Conformance == | == Specification Conformance == | ||
− | [http://www.w3.org/TR/CSS1#background-image | + | [http://www.w3.org/TR/CSS1#background-image CSS 1]<br /> |
− | CSS 2.1 | + | [http://www.w3.org/TR/CSS21/colors.html#propdef-background-image CSS 2.1 ]<br /> |
− | CSS 3 | + | [http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-background-image CSS 3]<br /> |
== Browser Compatibility == | == Browser Compatibility == | ||
== See Also == | == See Also == |
Latest revision as of 16:12, 10 April 2007
Contents
Summary
The background image property is used to set the background image for a given element.
Applicability: | The background image property can be used for all CSS elements. | |
Media Group: | Visual | |
Inherited: | No |
Syntax
TARGET_ELEMENT {background-image: value ;}
Legal Values
url | A URL path to an image file to be used as the background image. |
none | Specifies that no background image is to be used. |
Mozilla Recommended Values
It is strongly recommended that developers should specify a background-color to be used if a given image is not available. This is similar to placing alternate text for images.t available. Background images are rendered in the foreground (i.e on top of the background color). This should be considered when using images with transparent background.
Usage Examples
body { background-image: url("images/mybackground.png"); } p { background-image: none; }
Notes
See Mozilla Recommended Values section.