JSFiddle - React, Tailwind, and code Playground

by Ed Bulikyan

HTML

<ul>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>

CSS

li {
  padding: 5px;
  background-color: #f00;
  margin-bottom: 10px;
}

li:nth-child(1n+2):not(:last-child) {
  background-color: lime;
}