Platform Support
| IE | Mozilla | Netscape | Opera | Safari | Chrome | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | ||
|---|---|---|---|---|---|---|---|---|---|
|
CSSStyleDeclaration Constructor() : CSSStyleDeclaration
CSS style declaration block consisting of CSS attributes and their values.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | ||
CSSStyleDeclaration() : CSSStyleDeclarationCSS style declaration block consisting of CSS attributes and their values. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome |
|---|---|---|---|---|---|---|---|
|
cssText
: String
Text for the current CSS rule.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|
|||||||
|
length
: Number
Number of CSS style attributes in the style declaration block.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|
|||||||
|
parentRule
: CSSRule
CSSRule that contains the CSSStyleDeclaration.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|
|||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
getPropertyCSSValue(String propertyName) : CSSValue
Returns a CSS attribute value as an object.
|
Show Details | no | 1.0+ | no | no | no | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||||||
|
getPropertyPriority(String propertyName) : String
Returns the priority of a CSS attribute.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||||||
|
getPropertyValue(String propertyName) : String
Returns a CSS attribute value as a string.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||||||
|
item(Number index) : String
Returns the name of the CSS attribute at the specified position.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||||||
|
removeProperty(String propertyName) : String
Removes the specified CSS attribute from the CSS style declaration block.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||||||
|
setProperty(String propertyName, String value, String priority) : void
Sets the value for a CSS attribute for a CSS style declaration block.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||||||
References
Availability
HTML DOM Level 2|W3C