JavaScript CSSStyleDeclaration setProperty() Method
JavaScript CSSStyleDeclaration setProperty() Method
The setProperty() method is used to set a new CSS property or modify an existing one in the CSS declaration block.
Syntax:-
Its syntax is:- object.setProperty(propertyname, value, priority)
Further Explanation:-
Parameter | Description |
---|---|
propertyname | Required. A string that represents the name of the property to set |
value | Required. A string that represents the new value |
priority | Optional. A string that represents the priority of property. |