I have the following svg of a hexagon and a rotation animation in for it that only goes 1 direction at the moment. How would I adjust this so it rotates the other direction after each animation cycle?
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
svg {
animation: rotation 5s linear infinite;
}
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 184.751 184.751" xml:space="preserve">
<path d="M0,92.375l46.188-80h92.378l46.185,80l-46.185,80H46.188L0,92.375z"/>
</svg>
2
Answers
Is this what you mean? Using
animation-direction: alternate;
will flip the aninmation direction after the one cycle.it’s easy :