CSSCounterStyleRule: name ããããã£
Baseline
2023
Newly available
Since â¨September 2023â©, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
name 㯠CSSCounterStyleRule ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ããããã£ã§ãé¢é£ä»ããããã«ã¼ã«ã® name ã¨ãã¦å®ç¾©ããã <custom-ident> ãåå¾ã¾ãã¯è¨å®ãã¾ãã
å¤
æååã§ãã
ä¾
次ã®ä¾ã¯ @counter-style ã«ã¼ã«ã示ãã¦ãã¾ãã JavaScript ã§ã¯ myRules[0] ããã® @counter-style ã«ã¼ã«ã§ããã name ãè¿ãã¨ã«ã¹ã¿ã èå¥å "box-corner" ã¨ããå¤ãå¾ããã¾ãã
css
@counter-style box-corner {
system: fixed;
symbols: â° â³ â² â±;
suffix: ": ";
fallback: disc;
}
js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].name); // "box-corner"
仿§æ¸
| Specification |
|---|
| CSS Counter Styles Level 3 > # dom-csscounterstylerule-name > |