JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ul>
CSS
li:last-child:not(:nth-child(odd)){
background-color: red;
}
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ul>
li:last-child:not(:nth-child(odd)){
background-color: red;
}