1. 面向开发者的 Web 技术
  2. Web API
  3. CSSCounterStyleRule
  4. CSSCounterStyleRule:system 属性

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

CSSCounterStyleRule:system 属性

基线 广泛可用

自 2023年9月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。

CSSCounterStyleRule 接口的 system 属性用于获取或设置 system 描述符的值。如果描述符没有设置值,此属性返回空字符串。

字符串。

示例

以下示例展示了 @counter-style 样式的规则。在 JavaScript 中,myRules[0]@counter-style 规则,system 返回值为"fixed"。

css
@counter-style box-corner {
 system: fixed;
 symbols: ◰ ◳ ◲ ◱;
 suffix: ": ";
}
js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].system); // "fixed"

规范

规范
CSS Counter Styles Level 3
# dom-csscounterstylerule-system

浏览器兼容性

帮助改进 MDN

了解如何参与贡献

此页面最后更新于 ,由 MDN 贡献者更新。

AltStyle によって変換されたページ (->オリジナル) /