0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Tailwind】li要素のマーカーの色を設定する

Posted at

概要

HTMLで箇条書き的な表示をする際に、li要素を使うと思います。
今回はTailwindで、この箇条書きの先頭のマーカー(中点)の色を設定したいという時にどうすればよいかメモ書きします。

対応方針

How to get colored bullet list dots just using TailwindCSS utility classesの記事にある通り、classでmarker:text-greenのような指定で色を設定できます。

実装サンプル

上記で紹介した記事ほぼそのままですが、以下のような感じで色を設定できます。

<ul class="list-disc">
  <li class="marker:text-red-700">
    マーカーサンプル
  </li>
</ul>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?