I would like to keep the animation continuing till the end not restart when I move the mouse inside the element but the cursor (mouse pointer) is always inside the original element. Is it possible?
My code is: Fiddle Demo
.container{
height: 200px;
width: 100px;
}
.conteiner li{
display: inline-block; float: left;
text-align: center;
height: 100%; width: auto;
background-color: white;
}
.conteiner li a{
position: relative; display: flex;
align-items: center;
justify-content: center;
padding: 0 2em 0 2em;
border: solid 1px black;
}
.conteiner li:HOVER{
animation-name: menu_header_li;
animation-duration: 5s;
animation-timing-function: linear;
}
@keyframes menu_header_li {
0%{
transform: rotateY(0deg);
background-color: white;
}
50%{
transform: rotateY(90deg);
background-color: red;
}
100%{
transform: rotateY(0deg);
background-color: white;
}
}
If I move mouse on the element, the animation restarts and I don't understand why.