What you need simplifies to this:
.image{
animation: spin 1.2s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
First, select the image and set animation to an animation with arbitrary name (spin sounds good for something rotating, but choose what you want. spin
is the name i choose, 1.2s is duration but it can be ms as well like 500ms
or 1200ms
.
Then, define the animation by calling @keyframes animationName
and then every attributte may be a percentaje, or from/to keywords like this too:
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
But by using that way you can't customize that much, you only get a starting and a finish point. With percentajes you can define the animation to do many different stuff.
I hope this helps you out, and let me know if need to clarify something.