CSSStyleDeclaration

Category: browser, cssom

See: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration

cssStyleDeclaration.length

Number of properties in this style declaration

Read only

cssStyleDeclaration.parentRule : CSSStyleRule

Get the parent style rule

Read only

cssStyleDeclaration.item(index)

Return the property name at the specified index.

Param
Type
index
number

cssStyleDeclaration.getPropertyValue(property)

Returns the value of the specified property

Param
Type
property
DOMString

cssStyleDeclaration.setProperty(property, value, [priority])

Set the property value

Param
Type
Default
property
DOMString
value
DOMString
[priority]
string
""

cssStyleDeclaration.removeProperty(property)

Remove the specified property

Param
Type
property
DOMString