CSSKeywordValue:value 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
CSSKeywordValue 接口的 value 属性返回或设置 CSSKeywordValue 的值。
值
字符串。
异常
TypeError-
如果
value属性被设置为空字符串则抛出此异常。
示例
以下示例重设 CSS 的 display 属性为其默认值
js
let indicator = document.getElementById("indicator");
indicator.attributeStyleMap.set("display", new CSSKeywordValue("initial"));
indicator.attributeStyleMap.get("display").value; // 'initial'
规范
| Specification |
|---|
| CSS Typed OM Level 1> # dom-csskeywordvalue-value> |
浏览器兼容性
Loading…