CSSValue
已弃用: 不再推荐使用该特性。虽然一些浏览器仍然支持它,但也许已从相关的 web 标准中移除,也许正准备移除或出于兼容性而保留。请尽量不要使用该特性,并更新现有的代码;参见本页面底部的兼容性表格以指导你作出决定。请注意,该特性随时可能无法正常工作。
CSSValue
接口表示经过计算的当前 CSS 属性值。属性
CSSValue.cssText
-
DOMString
代表当前值。 CSSValue.cssValueType
只读-
一个
unsigned short
类型的数据用来定义了值的类型。可取值为:值 说明 CSS_CUSTOM
该值是一个自定义值。 CSS_INHERIT
该值是继承来的值,并且它的 cssText
属性值中包含"inherit"
。CSS_PRIMITIVE_VALUE
该值是一个原始值,并且是 CSSPrimitiveValue
接口的一个实例,可以通过绑定特殊的构造方法在这个 CSSValue 接口的这个实例来获得。CSS_VALUE_LIST
该值是一个 CSSValue
列表,是CSSValueList
接口的一个实例,可以通过绑定特殊的构造方法在这个 CSSValue 接口的这个实例来获得。
规范
该特性最初在 DOM Style Level 2 中定义,但从那时起已从标准化工作中移除。
它已被现代、不兼容的 CSS 类型对象模型 API 取代,该 API 已被标准化。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CSSValue | ||||||||||||
cssText | ||||||||||||
cssValueType |
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.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.