suffix

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.

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 GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
suffix

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報