-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Expand file tree
/
Copy pathindex.md
More file actions
34 lines (22 loc) · 998 Bytes
/
index.md
File metadata and controls
34 lines (22 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: CSSVariableReferenceValue
slug: Web/API/CSSVariableReferenceValue
l10n:
sourceCommit: ecc46f2c8d6e09f0aa6e1b3f5194abfcf462e603
---
{{APIRef("CSSOM")}}
[CSS 类型对象模型 API](/zh-CN/docs/Web/API/CSS_Object_Model) 的 **`CSSVariableReferenceValue`** 接口允许你为内置 CSS 值创建自定义名称。此对象功能有时称为“CSS 变量”,其用途与 {{cssxref("var", "var()")}} 函数相同。自定义名称必须以两个连字符开头。
## 构造函数
- {{domxref("CSSVariableReferenceValue.CSSVariableReferenceValue", "CSSVariableReferenceValue()")}}
- : 创建一个新的 `CSSVariableReferenceValue` 对象。
## 实例属性
- {{domxref('CSSVariableReferenceValue.variable')}}
- : 返回传递给构造函数的自定义名称。
- {{domxref('CSSVariableReferenceValue.fallback')}} {{ReadOnlyInline}}
- : 返回自定义名称对应的内置 CSS 值。
## 实例方法
无。
## 规范
{{Specifications}}
## 浏览器兼容性
{{Compat}}