Is it possible to reverse this animation direction on mouseleave ?
i tried to add a mouseleave even to .link but it stops the hovering
.link {
position: relative;
overflow: hidden;
display: inline-block;
font-size: 100px;
}
.box {
width: 100%;
height: 100%;
content: '';
background: black;
position: absolute;
left: 0;
transform: translateX(-100%);
transition: transform 0.5s ease-in;
}
.link:hover .box {
transform: translateX(0)
}
<a class="link">
item
<span class="box"></span>
</a>