CSSVariableReferenceValue
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
CSS 类型对象模型 API 的 CSSVariableReferenceValue
接口允许你为内置 CSS 值创建自定义名称。此对象功能有时称为“CSS 变量”,其用途与 var()
函数相同。自定义名称必须以两个连字符开头。
构造函数
CSSVariableReferenceValue()
-
创建一个新的
CSSVariableReferenceValue
对象。
实例属性
CSSVariableReferenceValue.variable
-
返回传递给构造函数的自定义名称。
CSSVariableReferenceValue.fallback
只读-
返回自定义名称对应的内置 CSS 值。
实例方法
无。
规范
Specification |
---|
CSS Typed OM Level 1> # cssvariablereferencevalue> |
浏览器兼容性
Loading…