JSFiddle - React, Tailwind, and code Playground

by cbrwizard

HTML

<h1>
keke
</h1>

<ul>
  <li>First Item</li>
  <li>Second Item</li>
  <li>Third Item</li>
  <li>Fourth Item</li>
  <li>Fifth Item</li>
</ul>

CSS

h1 {
position: relative; 
text-align: center;
}

h1:after {
position: absolute;
width:100px;
content: '';
height: 3px;
bottom: 0;
left: 50%;
margin-left: -50px;
background: red;
}

li {
  background: slategrey;
}
/* select the second-last item */
ul li:nth-last-child(2) {
  background: lightslategrey;
}