CSSStyleDeclaration removeProperty() methode
Definitie en gebruik
removeProperty()
De methode verwijdert de opgegeven CSS-eigenschap uit de CSS-declaratieblokken.
Voorbeeld
Verwijder de eigenschap color:
var declaration = document.styleSheets[0].cssRules[0].style;
var removedvalue = declaration.removeProperty("color");
alert(removedvalue);
Probeer het zelf
Syntax
object.removeProperty(propertyname)
Parameters
Parameters |
Description |
propertyname |
Required. String representing the name of the attribute to be removed. |
Technical details
DOM version: |
CSS Object Model |
Return value: |
String representing the old value of the removed attribute. |
Browser support
Chrome |
Edge |
Firefox |
Safari |
Opera |
Chrome |
Edge |
Firefox |
Safari |
Opera |
Support |
9.0 |
Support |
Support |
Support |