I want to flip an element continuously on the y axis from 0 to 360 degree with css without an action (button, hover).
Some script allow it one single time by adding a class, like: animate.css
And other just flip on button press (http://desandro.github.io/3dtransforms/docs/card-flip.html) or on hover (http://davidwalsh.name/demo/css-flip.php)
.img:hover {
transform: rotateY(360deg);
transition: transform 10s;
}
That what I tried so far, but it does only work once and only on hover...
Can you help me to get the code?
Use a CSS animation with infinite.
img {
-webkit-animation: anim 10s infinite linear;
animation: anim 10s infinite linear;
}
@-webkit-keyframes anim {
from {-webkit-transform: rotateY(0deg);}
to {-webkit-transform: rotateY(360deg);}
}
@keyframes anim {
from {transform: rotateY(0deg);}
to {transform: rotateY(360deg);}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With