You should add and define another animation, perhaps like so:
@keyframes rotate
{
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
And then add the animation to your element, separating it with a comma:
animation:myfirst 5s infinite alternate, rotate 2.5s linear infinite;
In this example note the following things:
2.5s
I chose this to make two complete rotation in one go of your first animation, I thought it looked smoother.linear
gives you the feeling of endless rotation in the void. Try other functions if you don't want this effect.I didn't put
alternate
because we want the element to spin continuously.