interface
Csscounterstylerule — CSS reference
CSSOM interface representing a named @counter-style rule. Exposes its name and individual descriptor strings, such as system, symbols and suffix. The example inspects the rule through its interface rather than assuming its position in the stylesheet.
Formal Syntax & Structure
css syntaxcss
document.styleSheets[0].cssRules[0] // CSSCounterStyleRuleWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSSCounterStyleRule</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/1.5 sans-serif}#a{margin:16px;padding:8px 8px 8px 80px;background:white}li{padding-left:4px}@counter-style demo{system:fixed;symbols:A B;suffix:": "}#a{list-style:demo inside}</style><body><ol id="a"><li>ONE</li><li>TWO</li><li>THREE</li></ol></body></html>