::marker

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

::markerCSS擬似要素で、リスト項目の箇条書き記号ボックス(ふつうは黒丸や番号が入ったもの)を選択します。これは display: list-item が設定された要素や擬似要素、例えば <li> 要素や <summary> 要素で利用できます。

試してみましょう

利用できるプロパティ

::marker 擬似要素は、限られた数の CSS プロパティのみに対応しています。例えば以下のようなものがあります。

メモ: 仕様書では、将来的にさらなる CSS プロパティに対応する可能性があるとしています。

構文

css
::marker {
  /* ... */
}

HTML

html
<ul>
  <li>Peaches</li>
  <li>Apples</li>
  <li>Plums</li>
</ul>

CSS

css
ul li::marker {
  color: red;
  font-size: 1.5em;
}

結果

仕様書

Specification
CSS Pseudo-Elements Module Level 4
# marker-pseudo

ブラウザーの互換性

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
::marker
Animation and transition support

Legend

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

Full support
Full support
Partial support
Partial support
No support
No support

関連情報