JSFiddle - React, Tailwind, and code Playground
by thirtydot
HTML
<ul>
<li>ho</li>
<li>ho</li>
<li>ho</li>
<li>ho</li>
<li>ho</li>
</ul>
CSS
li {
color: blue;
}
li:nth-child(odd) {
color: green;
}
li:nth-child(even) {
color: red;
}