JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>Раз</li>
<li>Два</li>
<li>Три</li>
</ul>
CSS
ul {
list-style: none;
margin: 0;
padding: 0 4em 0 0;
position: relative;
border-bottom: 10px solid #ccc;
text-align: right;
}
li {
display: inline-block;
margin: 0;
padding: .5em 2em;
height: 1em;
background: #ccc;
border-radius: 3px 3px 0 0;
cursor: pointer;
}
li:hover::after {
content: '';
display: block;
height: 10px;
position: absolute;
left: 0;
right: 0;
bottom: -10px;
}
li:nth-child(1):hover, li:nth-child(1):hover::after {
background: #fcc;
}
li:nth-child(2):hover, li:nth-child(2):hover::after {
background: #cfc;
}
li:nth-child(3):hover, li:nth-child(3):hover::after {
background: #ccf;
}