B.2. background

A shorthand property that allows you to set all the background properties of an element with a single property declaration.

Inherited: No

See also: Section B.3background-attachment, Section B.4background-color, Section B.5background-image, Section B.6background-position, and Section B.8background-repeat

B.2.1. Value

You can specify any of the values permitted by the five background- properties, in any order, separated by spaces. The properties you do not specify take on their initial value.

Initial value: none

B.2.2. Compatibility

CSS Version: 1

Is supported by Internet Explorer 4 or later, Netscape 6 or later, Opera 5 or later, and all Mozilla browsers. Is partially supported by Netscape 4.x; however, this support is undocumented and unreliable.

B.2.3. Examples

This rule gives the page a fixed (non-scrolling) background image, which will display over a solid white background:

body {
  background: #fff url(/images/texture.gif) fixed;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset