blob: ba94f210d0d46a504cbe878219f4c6c6923ba99e (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
---
title: CSSValueList
slug: Web/API/CSSValueList
tags:
- API
- CSS
- DOM
- 参考
- 接口
translation_of: Web/API/CSSValueList
---
<div>{{APIRef("DOM")}}</div>
<p>The <code><strong>CSSValueList</strong></code> 接口继承自 {{domxref("CSSValue")}} 接口,提供一个经过排序的 CSS 值的抽象集合。</p>
<p>一些属性允许在它们的语法中使用空的列表。这时,these properties take the <code>none</code> identifier. So, an empty list means that the property has the value <code>none</code>.</p>
<p>The items in the <code>CSSValueList</code> are accessible via an integral index, starting from 0.</p>
<p>{{InheritanceDiagram}}</p>
<h2 id="属性">属性</h2>
<p><em>从它的父接口 {{domxref("CSSValue")}} 继承属性。</em></p>
<dl>
<dt>{{domxref("CSSValueList.length")}} {{readonlyInline}}</dt>
<dd>一个 <code>unsigned long</code> 数值,表示此列表中 <code>CSSValues</code> 的个数。</dd>
</dl>
<h2 id="方法">方法</h2>
<dl>
<dt>{{domxref("CSSValueList.item()")}}</dt>
<dd>This method is used to retrieve a {{domxref("CSSValue")}} by ordinal index. The order in this collection represents the order of the values in the CSS style property. If index is greater than or equal to the number of values in the list, this returns <code>null</code>.</dd>
</dl>
<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-CSSValuesList', 'CSSValuesList')}}</td>
<td>{{Spec2('DOM2 Style')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<div>
<p>{{Compat("api.CSSValueList")}}</p>
</div>
<h2 id="参见">参见</h2>
<ul>
<li>{{domxref("CSSPrimitiveValue")}}</li>
<li>{{domxref("CSSValue")}}</li>
</ul>
|