Use an SVG version of the icon and use CSS animation to implement the rotation animation.
A reference thread: