<style>
:any-link {
position: relative;
margin: 2px;
padding: 0 4px;
text-decoration: none;
color: black;
transition: color 400ms;
}
:any-link::before {
position: absolute;
top: 0;
right: 50%;
bottom: 0;
left: 50%;
z-index: -1;
content: "";
background-color: transparent;
transition: right 400ms, left 400ms, background-color 400ms;
}
:any-link:hover {
color: white;
}
:any-link:hover::before {
right: 0;
left: 0;
background-color: hsl(215, 65%, 50%);
}
</style>
<a href="#">Hello World!</a>