Object: CSSStyleDeclaration
The CSSStyleDeclaration object represents a CSS declaration block consisting of CSS properties and their values. This object enables you to determine the style properties currently set in a block or to set style properties explicitly within the block.
This object also provides access to the computed values of an element. It does not provide access to the specified or actual values of the CSS cascade.
CSSStyleDeclaration methods
|
Method name |
Description |
Support level |
Availability |
|---|---|---|---|
|
Returns the value of a CSS property as an object, if the property has been explicitly set. |
DOM 2 |
4.6 or later |
|
|
Returns the priority of a CSS property. |
DOM 2 |
4.6 or later |
|
|
Returns the value of a CSS property as a string, if the property has been explicitly set. |
DOM 2 |
4.6 or later |
|
|
Returns the name of the CSS property at the specified index in the collection. |
DOM 2 |
4.6 or later |
|
|
Removes a CSS property from the style declaration block. |
DOM 2 |
4.6 or later |
|
|
Sets the value of a CSS property for the style declaration block. |
DOM 2 |
4.6 or later |