Font Awesome includes a spin animation for elements with the class fa-spin
. Inspection of the CSS shows that a spinning elementis implemented using a keyframes definition again called fa-spin
.
Rather than define a new animation, I want to use this existing one in a hover selector.
i.fa-gear:hover {
-webkit-animation: fa-spin 2s infinite linear;
}
But it simply doesn't work.
Here's an example in a JSBin.
At first I thought it was because JSBin imported the CSS section before the Font Awesome rules were defined, but that doesn't appear to be the case.