I\'m using CSS transforms/animations with font-face (twitter bootstrap/font-awesome) to produce a spinner gif-like icon.
The problem is that the icon wobbles as it revol
By default, CSS transforms things about their vertical and horizontal center with the property transform-origin
. A short-hand syntax for this default value is 50% 50%
, which represents the x and then y value of the origin.
For this icon, I found that shifting the y origin to 38% smooths it out a bit, but you'll need to play around with it to get the precise values. View on JSFiddle
i.icon-repeat {
-webkit-transform-origin:50% 38%;
-moz-transform-origin:50% 38%;
-ms-transform-origin:50% 38%;
-o-transform-origin:50% 38%;
transform-origin: 50% 38%;
}
For more on the transform-origin
property, I recommend the MDN article on the property.