Animación continua de rotación CSS al pasar el mouse, animada de nuevo a 0 grados al pasar el mouse
Tengo un elemento que gira cuando pasas el cursor sobre él indefinidamente. Cuando te desplazas, la animación se detiene. Sencillo
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
.elem:hover {
-webkit-animation-name: rotate;
-webkit-animation-duration: 1.5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}
Sin embargo, cuando se desplaza, la animación cesa abruptamente, volviendo a 0 grados. Me gustaría animar de nuevo a esa posición, pero tengo algunos problemas para resolver la sintaxis.
¡Cualquier entrada sería increíble!