I'm attempting to create an animation for a specific path within an SVG that contains multiple paths. My goal is to have the arrow path remain in its position while rotating 180 degrees around its own center.
Previous solutions on Stack Overflow recommend using transform-origin, but those tricks don't seem to be working.
SVG Snippet
.arrow{
animation: inboxToOutbox 5s infinite
}
@keyframes inboxToOutbox {
50% {
transform: rotate(-180deg);
}
}
<svg width ='50px' height='50px' viewBox="166.588 216.37 99.996 85.641" xmlns="http://www.w3.org/2000/svg">
<path id = "box" style={{fill:"#ffff"}} d="M 99.404 68.401 C 98.855 67.087 97.904 65.946 96.719 65.222 L 80.784 54.5 L 70.968 54.5 L 87.97 67.543 L 70.247 67.543 C 69.701 67.543 69.255 67.842 68.996 68.292 L 68.965 68.335 L 69.042 68.227 L 64.964 79.383 L 35.042 79.383 L...
<path class='arrow' style={{fill:"#ffff"}} d="M 226.109 238.851 L 242.609 238.851 L 216.609 264.011 L 190.609 238.851 L 207.109 238.851 L 207.258 216.37 L 226.698 216.665 L 226.109 238.851 Z">
</path>
</svg>
I would like to implement an animation where the arrow moves from inbox to outbox when hovered over by rotating at its own center.