JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
<li>a</li>
<li>a</li>
<li>a</li>
<li>4</li>
<li>a</li>
<li>a</li>
<li>a</li>
<li>a</li>
<li>a</li>
</ul>

CSS

li:nth-child(n+5) {
    background-color:blue;
    color: white;
}