style.background (Property)

A shortcut to specify several background properties.


CSS level - 1
DOM level - 2
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Opera - 5
Property/method value type:String primitive
JavaScript syntax:-myStyle.background
CSS syntax:background: anAttachment aColor anImage aPosition aRepeat
Argument list:anAttachmentScrollability of the background
aColorBase color value
anImageBackground image URL
aPositionImage location reference
aRepeatRepeat 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:

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.

See also:Background.src, style.backgroundAttachment, style.backgroundColor, style.backgroundImage, style.backgroundPosition, style.backgroundPositionX, style.backgroundPositionY, style.backgroundRepeat