CSSValueList:length 属性
Deprecated
Avoid using this feature in new projects. The DOM level 2 CSS object model was excluded from the later CSS object model (CSSOM) specification. This feature may be a candidate for removal from web standards or browsers.>
Consider using the following features instead: CSS object model.>
CSSValueList 接口的 length 只读属性表示列表中 CSSValue 的数量。索引的有效值范围是 0 到 length-1(包含)。
备注:此属性曾是创建类型化 CSS 对象模型尝试的一部分。该尝试已被放弃,大多数浏览器并未实现它。
为了实现你的目标,你可以使用:
- 无类型的 CSS 对象模型,广泛支持;或
- 现代化的 CSS 类型对象模型 API,支持较少且被视为实验性特性。
值
一个 unsigned long 类型的值,表示 CSSValue 的数量。
规范
此特性最初定义于 DOM 样式第 2 版规范,但自那以后已从任何标准化工作中移除。
它已被现代但不兼容的 CSS 类型对象模型 API 所取代,后者现已进入标准轨道。