CSS Style Declaration Object (CSSStyleDeclaration)
CSSStyleDeclaration Object
The CSSStyleDeclaration object represents a collection of CSS property-value pairs.
CSSStyleDeclaration Object Properties
| Property |
Description |
| cssText |
Sets or returns the style declaration text. cssText corresponds to the style attribute of an HTML element. |
| length |
Returns how many declarations are contained in the style. |
| parentRule |
Returns the rule that contains the current rule. |
CSSStyleDeclaration Object Methods
| Method |
Description |
| getPropertyPriority() |
Returns whether the specified CSS property has "important!" set. |
| getPropertyValue() |
Returns the value of the specified CSS property. |
| item() |
Returns the CSS property name in the CSS declaration by index. |
| removeProperty() |
Removes a CSS property from the CSS declaration. |
| setProperty() |
Creates or modifies a CSS property in the CSS declaration block. |
Other Extensions