Proper way to reset a GIF animation with display:none on Chrome

后端 未结 11 1605
暗喜
暗喜 2020-12-03 05:21

Title is self-explanatory, but I\'ll provide a step-by-step view on the matter. Hopefully I\'m not the first one to have noticed this (apparently) bug on Webkit/Chrome.

11条回答
  •  忘掉有多难
    2020-12-03 05:43

    I worked out a complete solution for this problem. It can be found here: https://stackoverflow.com/a/31093916/1520422

    My solution restarts the animation WITHOUT re-loading the image data from the network.

    It also enforces the image to repaint to fix some painting artefacts that occured (in chrome).

提交回复
热议问题