CSSUnparsedValue

这是 实验性技术
检查 浏览器兼容性表格 在生产中使用这之前。

CSSUnparsedValue interface of the CSS Typed Object Model API represents property values that reference custom properties . It consists of a list of string fragments and variable references.

Custom properties are represented by CSSUnparsedValue and var() references are represented using CSSVariableReferenceValue .

构造函数

CSSUnparsedValue.CSSUnparsedValue()
创建新的 CSSUnparsedValue 对象。

特性

CSSUnparsedValue.length
Returns the number of items in the CSSUnparsedValue 对象。

方法

CSSUnparsedValue.entries()
Returns an array of a given object's own enumerable property [key, value] pairs in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
CSSUnparsedValue.forEach()
Executes a provided function once for each element of the CSSUnparsedValue 对象。
CSSUnparsedValue.keys()
返回新 Array Iterator object that contains the keys for each index in the CSSUnparsedValue 对象。
CSSUnparsedValue.values()
返回新 Array Iterator object that contains the values for each index in the CSSUnparsedValue 对象。

规范

规范 状态 Comment
CSS Typed OM Level 1
The definition of 'CSSUnparsedValue' in that specification.
工作草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
CSSUnparsedValue
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
CSSUnparsedSegment
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
CSSUnparsedValue() 构造函数
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
entries
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
forEach
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
keys
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
length
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
values
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0
@@iterator
Chrome 66 Edge 79 Firefox No IE No Opera 53 Safari No WebView Android 66 Chrome Android 66 Firefox Android No Opera Android 47 Safari iOS No Samsung Internet Android 9.0

图例

完整支持
完整支持
不支持
不支持
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。

另请参阅