CSSCounterStyleRule: suffix-Eigenschaft
Baseline 2023Newly available
Since September 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Die suffix
-Eigenschaft der CSSCounterStyleRule
-Schnittstelle erhält und setzt den Wert des suffix
-Deskriptors. Wenn dem Deskriptor kein Wert zugewiesen wurde, gibt dieses Attribut einen leeren String zurück.
Wert
Ein String.
Beispiele
Das folgende Beispiel zeigt eine @counter-style
-Regel. In JavaScript ist myRules[0]
diese @counter-style
-Regel, die Rückgabe von suffix
gibt uns den Wert ": ".
@counter-style box-corner {
system: fixed;
symbols: ◰ ◳ ◲ ◱;
suffix: ": ";
negative: "-";
}
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].suffix); // ": "
Spezifikationen
Specification |
---|
CSS Counter Styles Level 3 # dom-csscounterstylerule-suffix |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
suffix |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support