blob: ffec82398734501a255b27756488ed6fdcebd6cb (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
|
---
title: CSSValueList.length
slug: Web/API/CSSValueList/length
tags:
- API
- CSS
- CSSValueList
translation_of: Web/API/CSSValueList/length
---
<div>{{APIRef("DOM")}}</div>
<p>{{domxref("CSSValueList")}} 接口的只读属性 <code><strong>length</strong></code> 表示列表中的 {{domxref("CSSValue")}} 数量。有效的索引区间为 <code>0</code> 到 <code>length-1</code>。</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox">var <var>length</var> = <var>cssValueList</var>.length;
</pre>
<h3 id="值">值</h3>
<p>一个 <code>unsigned long</code> 数值,表示此列表中 {{domxref("CSSValue")}} 的个数。</p>
<h2 id="规范">规范</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">规范</th>
<th scope="col">状态</th>
<th scope="col">备注</th>
</tr>
<tr>
<td>{{SpecName('DOM2 Style', 'css.html#CSS-CSSValueList-length', 'CSSValueList.length')}}</td>
<td>{{Spec2('DOM2 Style')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<div>
<p>{{Compat("api.CSSValueList.length")}}</p>
</div>
|