CSSValueList.length

已弃用: 不再推荐使用该特性。虽然一些浏览器仍然支持它,但也许已从相关的 web 标准中移除,也许正准备移除或出于兼容性而保留。请尽量不要使用该特性,并更新现有的代码;参见本页面底部的兼容性表格以指导你作出决定。请注意,该特性随时可能无法正常工作。

CSSValueList 接口的只读属性 length 表示列表中的 CSSValue 数量。有效的索引区间为 0length-1

语法

var length = cssValueList.length;

一个 unsigned long 数值,表示此列表中 CSSValue 的个数。

规范

该特性最初在 DOM Style Level 2 中定义,但从那时起已从标准化工作中移除。

它已被现代、不兼容的 CSS 类型对象模型 API 取代,该 API 已被标准化。

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
length
Deprecated

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Deprecated. Not for use in new websites.