StylePropertyMap

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

CSS 类型对象模型 API (en-US)StylePropertyMap 接口提供了 CSS 声明块的表示,该声明块可以替代 CSSStyleDeclaration

StylePropertyMapReadOnly (en-US) StylePropertyMap

属性

从其父级 StylePropertyMapReadOnly (en-US) 继承属性。

方法

从其父级 StylePropertyMapReadOnly (en-US) 继承方法。

StylePropertyMap.append() (en-US)

使用给定的属性和值向 StylePropertyMap 添加新的 CSS 声明。

StylePropertyMap.clear() (en-US)

删除 StylePropertyMap 中的所有声明。

StylePropertyMap.delete() (en-US)

使用给定属性删除 CSS 声明。

StylePropertyMap.set() (en-US)

使用给定属性更改 CSS 声明。

规范

Specification
CSS Typed OM Level 1
# the-stylepropertymap

浏览器兼容性

BCD tables only load in the browser