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