此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

CSSVariableReferenceValue:CSSVariableReferenceValue() 构造函数

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

创建一个新的 CSSVariableReferenceValue

语法

js
new CSSVariableReferenceValue(variable)
new CSSVariableReferenceValue(variable, fallback)

参数

variable

一个自定义属性名称

fallback 可选

一个自定义属性回退值

规范

Specification
CSS Typed OM Level 1
# dom-cssvariablereferencevalue-cssvariablereferencevalue

浏览器兼容性