运行 JS 滚动画廊时,IE8 冻结了我的动画 GIF。请帮忙
预先感谢您的帮助。
我目前正在使用一个漂亮的动画 GIF,我设计它作为我网站的标题徽标。在我放入垂直滚动画廊之前,这种方法一直有效。 当图库开始滚动(页面加载后 2 秒)时,GIF 会冻结,直到图库暂停后才会继续。该画廊使用 setInterval 函数,并在每个间隔内将滚动条中的图像移动一小部分。 我读到这是 IE8 的一个已记录的问题,并且已在 IE9 上修复(工作正常 - 是的,我已经在 IE9 中测试了它,不幸的是,它动摇了我讨厌 IE 的根基,因为它工作得很好)。< br> 不管怎样,有没有人有任何想法可以解决这个问题,让 GIF 在 IE8 中与图库同时呈现动画?我尝试过 Iframe 并预加载图像。然而,如果你想提出这些想法,最好看看我是否尝试正确地做到了它们。 谢谢
Thanks in advance for any help.
I'm currently using a nice animated GIF that i designed as the header logo for my site. This was working until I put in a vertical scrolling gallery.
When the gallery starts to scroll (2 seconds after the page loads) the GIF freezes and doesnt continue until the gallery is paused. The gallery works on a setInterval function and moves the images in the scroller a fraction each interval.
I've read that this is a documented problem with IE8 and has been fixed for IE9 (which works fine - and yes, I have tested it in IE9, unfortunately it has shaken my foundation of hating IE as it works quite nicely).
Anyway, has anyone got any ideas for a work around to get the GIF to animate at the same time as the gallery in IE8? I've tried an Iframe and preloading the image. However, if you want to suggest those ideas it would be good to see if i tried to do them correctly.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很难做到,因为 JavaScript 是单线程的。 Gif 动画消耗该单线程。因此,您无法同时渲染页面和制作 gif 动画。
This would be tough to do since JavaScript is singlethreaded. The Gif animation consumes that single thread. So you cannot render a page and animate a gif at the same time.