值
字串。
示例
以下示例展示了一個 規則。在 JavaScript 中,@counter-stylemyRules[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"
規範
| 規範 |
|---|
| CSS Counter Styles Level 3 # dom-csscounterstylerule-pad |
瀏覽器相容性
載入中…