Availability: |
| ||||||||
Property/method value type: | String primitive | ||||||||
JavaScript syntax: | - | myStyle.background | |||||||
CSS syntax: | background: anAttachment aColor anImage aPosition aRepeat | ||||||||
Argument list: | anAttachment | Scrollability of the background | |||||||
aColor | Base color value | ||||||||
anImage | Background image URL | ||||||||
aPosition | Image location reference | ||||||||
aRepeat | Repeat flag |
This is a convenience property for specifying several properties of the background all at once. It is recommended that you specify the properties individually unless you plan to replace all of them with this property value.
The individual value are space separated from one another and are specified individually as they would be for their specific properties.
The following properties are collected into this convenience property:
style.backgroundAttachment
style.backgroundColor
style.backgroundImage
style.backgroundPosition
style.backgroundRepeat
Note that the style.backgroundPosition value itself is composed of two values; the x coordinate followed by the y coordinate.
If, when you define this set of properties, you omit a keyword in the namespace of any particular property, that property will be set to its default initial value.
Prev | Home | Next |
style.azimuth | Up | style.backgroundAttachment |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |