item()
方法在
CSSValueList
interface is used to retrieve a
CSSValue
by ordinal index.
The order in this collection represents the order of the values in the CSS style property. If the index is greater than or equal to the number of values in the list, this method returns
null
.
var cssValue = cssValueList.item(index);
unsigned long
representing the index of the CSS value within the collection.
A
CSSValue
object at the
index
position in the
CSSValueList
,或
null
if that is not a valid index.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSValueList.item' in that specification. |
过时 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
item
弃用
|
Chrome 不支持 No | Edge 不支持 No | Firefox 不支持 1 — 62 | IE ? | Opera 不支持 No | Safari ? | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 不支持 4 — 62 | Opera Android ? | Safari iOS ? | Samsung Internet Android 不支持 No |
不支持
兼容性未知
弃用。不要用于新网站。
CSSValueList
item()
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
节点
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument