CSSCounterStyleRule: negative ããããã£
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.
negative 㯠CSSCounterStyleRule ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ããããã£ã§ã negative è¨è¿°åã®å¤ãåå¾ã¾ãã¯è¨å®ãã¾ãããã®è¨è¿°åã«å¤ãè¨å®ããã¦ããªãå ´åããã®å±æ§ã¯ç©ºæååãè¿ãã¾ãã
å¤
æååã§ãã
ä¾
次ã®ä¾ã¯ @counter-style ã«ã¼ã«ã示ãã¦ãã¾ãã JavaScript ã§ã¯ myRules[0] ããã® @counter-style ã«ã¼ã«ã§ããã negative ãè¿ã㨠"-" ã¨ããå¤ãå¾ããã¾ãã
css
@counter-style neg {
system: numeric;
symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
negative: "-";
}
js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].negative); // "-"
仿§æ¸
| Specification |
|---|
| CSS Counter Styles Level 3 > # dom-csscounterstylerule-negative > |