suffix
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.
suffix
は @counter-style
ルールの記述子で、マーカーの表現に追加されるものを指定します。
構文
css
/* <symbol> values */
suffix: "";
suffix: ") ";
suffix: url(bullet.png);
値
<symbol>
-
マーカー表現に追加される記号を指定します。
<string>
,<image>
,<custom-ident>
が指定できます。
公式定義
関連するアット規則 | @counter-style |
---|---|
初期値 | ". " (ピリオドの後に空白) |
計算値 | 指定通り |
形式文法
<symbol> <symbol> = <string> | <image> | <custom-ident>
例
カウンターの接尾辞を設定
HTML
html
<ul class="choices">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>None of the above</li>
</ul>
CSS
css
@counter-style options {
system: fixed;
symbols: A B C D;
suffix: ") ";
}
.choices {
list-style: options;
}
結果
仕様書
Specification |
---|
CSS Counter Styles Level 3 # counter-style-suffix |
ブラウザーの互換性
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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
関連情報
list-style
,list-style-image
,list-style-position
symbols()
, 無名のカウンタースタイルを生成する関数記法