<div>
<ul>
<li>
<a href="">first</a>
</li>
<li>
<a href="">second</a>
</li>
<li>
<a href="">third</a>
</li>
</ul>
</div>
ul {
padding: 1rem 3rem;
display: flex;
align-items: center;
position: relative;
text-transform: uppercase;
border-top: 2px solid grey;
border-bottom: 2px solid grey;
padding: 0;
}
a {
text-decoration: none;
color: black;
}
li {
padding: 1rem 3rem;
display: flex;
align-items: center;
position: relative;
font-weight: 900;
font-size: 1em;
background: none;
border: 0;
cursor: pointer;
}
li:before {
content: "";
width: 2px;
background: grey;
height: 100%;
left: 0;
position: absolute;
transform: skew(-20deg);
top: 0;
bottom: 0;
}
li:after {
height: 2px;
content: "";
background: red;
width: 0;
position: absolute;
transform: translateX(-50%);
transition: width 0.7s;
transition-timing-function: cubic-bezier(1, 0.65, 0, 2.31);
left: 50%;
margin-top: 1.25rem;
}
li:hover,
li:focus {
outline: none;
}
li:hover:after,
li:focus:after {
width: calc(100% - 100px);
}
li:first-child:before {
background: transparent;
}
@media (max-width: 700px) {
li {
font-size: 10px;
padding: 0 10px;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.