li color change css code example

Example 1: how to change only bullet color in css

li::before {content: "•"; color: red;
  display: inline-block; width: 1em;
  margin-left: -1em}

Example 2: how to change only bullet color in css

li::before {content: counter(li); color: red;
  display: inline-block; width: 1em;
  margin-left: -1em}

Example 3: li color change css

h1>Todos</h1>
<style>
    
</style>
<ul>
 <li class="done">Walk Chickens</li>
  <li>Clean Out Coop</li>
  <li class="done">Collect Chicken Eggs</li>
  <li>Incubate Chicken Eggs</li>
  <li>Hatch New Chickens!</li>
</ul>
<button id="clear">Clear List</button>
<button>Add Todo</button>

Tags:

Css Example