CSSStyleDeclaration removeProperty() Method

CSS CSSStyleDeclaration CSS CSSStyleDeclaration

Example

Remove the color property:

var declaration = document.styleSheets[0].cssRules[0].style; var removedvalue = declaration.removeProperty("color"); alert(removedvalue);

Try it yourself »

Definition and Usage

The removeProperty() method is used to remove the specified CSS style property.


Browser Support

Method
removeProperty() Yes 9.0 Yes Yes Yes

Syntax

object.removeProperty(propertyname)

Property Values

Parameter Description
propertyname Required. A string representing the property name to be removed.

Technical Details

DOM Version: CSS Object Model
Return Value: A string, which is the name of the removed property.

CSS CSSStyleDeclaration CSS CSSStyleDeclaration

Other Extensions