Commit 2256984 1 parent 5b7a9ff commit 2256984 Copy full SHA for 2256984
File tree 1 file changed +37
-0
lines changed
files/zh-cn/web/api/csskeywordvalue/value
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : CSSKeywordValue:value 属性
3
+ slug : Web/API/CSSKeywordValue/value
4
+ l10n :
5
+ sourceCommit : d76defab4ca13261e9de81ae1df125345f847b0a
6
+ ---
7
+
8
+ {{APIRef("CSS Typed Object Model API")}}
9
+
10
+ {{domxref("CSSKeywordValue")}} 接口的 ** ` value ` ** 属性返回或设置 ` CSSKeywordValue ` 的值。
11
+
12
+ ## 值
13
+
14
+ 字符串。
15
+
16
+ ### 异常
17
+
18
+ - {{jsxref("TypeError")}}
19
+ - : 如果 ` value ` 属性被设置为空字符串则抛出此异常。
20
+
21
+ ## 示例
22
+
23
+ 以下示例重设 CSS 的 {{cssxref('display')}} 属性为其默认值
24
+
25
+ ``` js
26
+ let indicator = document .getElementById (" indicator" );
27
+ indicator .attributeStyleMap .set (" display" , new CSSKeywordValue (" initial" ));
28
+ indicator .attributeStyleMap .get (" display" ).value ; // 'initial'
29
+ ```
30
+
31
+ ## 规范
32
+
33
+ {{Specifications}}
34
+
35
+ ## 浏览器兼容性
36
+
37
+ {{Compat}}
You can’t perform that action at this time.
0 commit comments