IE7/IE8 and frozen animated gifs

前端 未结 3 1089
慢半拍i
慢半拍i 2020-12-30 04:56

I\'m quite sure this is an old problem.

This is how i render my animated gif:

 \'loading\'

        
3条回答
  •  抹茶落季
    2020-12-30 05:24

    I ran into this once. If I tried to use JavaScript to show a little loading throbber as the browser moved to a page that was going to take a while to load, IE wouldn't animate the GIF. I solved it by putting the loading throbber directly into the HTML (not inserted via JavaScript) in a hidden div:

    
    

    and then using JavaScript to toggle the visibility of the div after a short delay (this is using an older version of the Prototype library, but you get the idea):

    
    

    That function is triggered in the form's submit button:

    
    

    So instead of delaying the src attribute change, leave it alone and just delay the call to your entire showLoading() function. Good luck!

提交回复
热议问题