Using CSS3 transforms/animations with font-face produces “wobbly” spinner gif-like

前端 未结 4 2233
甜味超标
甜味超标 2021-02-13 12:05

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

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-13 12:34

    Try setting a specific height and width on the element. Through trial and error, I found that adding:

    #iconRepeatMain {
        width: 26px;
        height: 19px;
    }
    

    centers the font pretty well and seems to eliminate the wobbling. However, it's possible this is dependent on which browser is being used -- test it thoroughly.

    http://jsfiddle.net/mblase75/pGhFX/13/

提交回复
热议问题