Play Gif on Mouseover and Pause Gif on mouse out without replacing images?

前端 未结 2 1928
感情败类
感情败类 2021-01-05 13:51

I\'m trying to look for an example of code that allows the user to animate a gif on mouseover and pause when mouse out. I\'ve seen many tutorials talking about this but I wa

2条回答
  •  失恋的感觉
    2021-01-05 14:23

    There is not. Gif images can not "see" the mouse. They are merely images which display. In order to pause an animated gif it requires the swapping of a similar image which is not animated.

    That being posted, there are jquery plug ins to animate a sprite consisting of static images. These plug ins would allow the sprites to pause on mouse over

提交回复
热议问题