I have this animation:
div
{
width: 100px;
height: 100px;
margin: 50px 0 0 50px;
background: maroon;
animation: spinner 1s infinite linear;
perspective: 500px;
transform-style: preserve-3d;
}
@keyframes spinner {
0% { transform: rotate3d(1, 1, 1, 0deg); }
50% { transform: rotate3d(1, 1, 1, 180deg); }
100% { transform: rotate3d(1, 1, 1, 360deg); }
}
I'd like the square to spin one way infinitely. At the moment it spins on all axis from 0 to 360 and then it spins from 360 back the same way to 0. I'd like it to keep going one way, not go back on itself.
I've seen many examples of continuous spinning but most of them use rotate or transform, and not rotate3d. Is it possible to spin something infinitely using CSS rotate3D?