CSSStyleSheet.deleteRule()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.
概述
deleteRule方法用来从当前样式表对象中删除指定的样式规则。
语法
stylesheet.deleteRule(index)
参数
index 是一个数字,用来指定样式规则的位置
.
示例
myStyles.deleteRule(0);