CSSOM
CSSCounterStyleRule 接口的 range 属性用于获取或设置 @counter-style/range 描述符的值。如果描述符没有设置值,此属性返回空字符串。
值
字符串。
示例
以下示例展示了 @counter-style 样式的规则。在 JavaScript 中,myRules[0] 为 @counter-style 规则,range 返回值为“2 4, 7 9”。
@counter-style range-multi-example {
system: cyclic;
symbols: "\25A0" "\25A1";
range:
2 4,
7 9;
}
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].range); // "2 4, 7 9"
规范
浏览器兼容性
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
