My navbar has been styled with a transition that should ease in and out, but for some reason it's not working as expected. Even when I hover over the li a elements, the ease-in-out animation is not displaying, and I'm struggling to figure out what I've done wrong.
body {
margin: 0;
}
.nav-bar {
width: 100vw;
background-color: black;
}
.nav-bar-ul {
list-style: none;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 1em 0;
}
li a {
text-decoration: none;
color: white;
padding-right: 3em;
position: relative;
}
li a::after {
content: '';
position: absolute;
display: block;
height: 0.4em;
width: 0%;
background-color: white;
bottom: -1em;
transition: all ease-in-out 250ms;
}
li a :hover::after {
width: 60%;
}
li a:hover {
color: white;
}
<div>
<div className="nav-bar">
<ul className="nav-bar-ul">
<li><a href="#">Logo</a></li>
<li><a href="#">Logo</a></li>
<li><a href="#">Logo</a></li>
<li><a href="#">Logo</a></li>
</ul>
</div>
</div>