Is it possible to use CSS pseudo-classes on list items?
I’d expect the following to produce a list of alternating colors, but instead I get a list of blue items:
CSS:
li { color: blue }
li:nth-child(odd) { color:green }
li:nth-child(even) { color:red }
HTML:
<ul>
<li>ho</li>
<li>ho</li>
<li>ho</li>
<li>ho</li>
<li>ho</li>
</ul>