Platform Support
IE | Mozilla | Netscape | Opera | Safari | no | 1.0+ | no | 9.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
CSSStyleDeclaration Constructor() : CSSStyleDeclaration
CSS style declaration block consisting of CSS attributes and their values.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | ||
CSSStyleDeclaration() : CSSStyleDeclarationCSS style declaration block consisting of CSS attributes and their values. Returns
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
cssText
: String
Text for the current CSS rule.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
||||||
length
: Number
Number of CSS style attributes in the style declaration block.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
||||||
parentRule
: CSSRule
CSSRule that contains the CSSStyleDeclaration.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
static getPropertyCSSValue(String propertyName) : CSSValue
Returns a CSS attribute value as an object.
|
Show Details | no | 1.0+ | no | no | no | |||||||||||
Parameters
Returns
|
|||||||||||||||||
static getPropertyPriority(String propertyName) : String
Returns the priority of a CSS attribute.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | |||||||||||
Parameters
Returns
|
|||||||||||||||||
static getPropertyValue(String propertyName) : String
Returns a CSS attribute value as a string.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | |||||||||||
Parameters
Returns
|
|||||||||||||||||
static 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+ | |||||||||||
Parameters
Returns
|
|||||||||||||||||
static 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+ | |||||||||||
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+ | |||||||||||
Parameters
Returns
|
References
Availability
HTML DOM Level 2|W3C