From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../cssstyledeclaration/removeproperty/index.html | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 files/zh-cn/web/api/cssstyledeclaration/removeproperty/index.html (limited to 'files/zh-cn/web/api/cssstyledeclaration/removeproperty') diff --git a/files/zh-cn/web/api/cssstyledeclaration/removeproperty/index.html b/files/zh-cn/web/api/cssstyledeclaration/removeproperty/index.html new file mode 100644 index 0000000000..b4437515b3 --- /dev/null +++ b/files/zh-cn/web/api/cssstyledeclaration/removeproperty/index.html @@ -0,0 +1,125 @@ +--- +title: CSSStyleDeclaration.removeProperty() +slug: Web/API/CSSStyleDeclaration/removeProperty +tags: + - API + - CSSOM + - Method + - Reference +translation_of: Web/API/CSSStyleDeclaration/removeProperty +--- +

{{ APIRef("CSSOM") }}

+ +

CSSStyleDeclaration.removeProperty() 方法移除style对象的一个属性。

+ +

语法

+ +
var oldValue = style.removeProperty(property);
+ +

参数

+ + + +

返回值

+ + + +

异常

+ + + +

例子

+ +

下面的 JavaScript 代码从样式表里移除了 margin 属性:

+ +
var declaration = document.styleSheets[0].rules[0].style;
+var oldValue = declaration.removeProperty('margin');
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSSOM', '#dom-cssstyledeclaration-removeproperty', 'CSSStyleDeclaration.removeProperty()')}}{{Spec2('CSSOM')}} 
{{SpecName('DOM2 Style', 'css.html#CSS-CSSStyleDeclaration', 'CSSStyleDeclaration')}}{{Spec2('DOM2 Style')}} 
+ +

浏览器支持情况

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
-- cgit v1.2.3-54-g00ecf