XML technologies / CSS / Advanced websites with CSS / CSS property reference / background
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The shorthand property background sets all values for an element’s background in a single declaration.
Inherited: no
See also: background-attachment, background-color, background-image, background-position and background-repeat
Values
For the background properties, all allowed values may be specified in any order, separated by spaces. Subproperties without an assigned value automatically receive their default values.
Default value: none
Compatibility
CSS version: 1
Supported by Internet Explorer 4 and later, Netscape 6 and later, Opera 5 and later, and all Mozilla versions. Partially supported by Netscape 4.x, but undocumented and unreliable there.
Example
The following rule creates a white page background with a background image in a fixed position:
body {
background: #fff url(/images/textur.gif) fixed;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg