JavaScript to control image animation?

后端 未结 4 1068
无人共我
无人共我 2020-12-16 04:16

I\'d like to have an animated character on the page, with different animations for different behaviours. I currently have two ideas for how it could work:

IDEA 1: Ha

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 04:53

    Idea 1 won't work, as JavaScript has no way of controlling the current frame of an Animated GIF - neither across browsers, nor using some specific (ActiveX / Mozilla specific) extension that I know of.

    I think you are left with Idea 2. I don't know how smooth the results are that you can achieve with this method, though - you'd have to test.

提交回复
热议问题