body{
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
font-family: 'Poppins', sans-serif;
}
ul{
position: relative;
margin: 0;
padding: 0;
}
ul li{
list-style: none;
margin: 0;
font-size: 1.5em;
}
ul li a{
position: relative;
color: #ddd;
text-decoration: none;
font-weight: 700;
transition: 0.5s ease-in-out;
}
ul li a:hover {
color:Black;
}
ul li a:before{
content: attr(data-text);
position: absolute;
top: -2px;
width: 100%;
color: #262626;
overflow: hidden;
white-space: nowrap;
}
ul:hover li a:before{
width: 0;
}
ul li:hover a:before{
width: 100%;
}