IE停止动画GIF [英] Animated GIF in IE stopping

查看:135
本文介绍了IE停止动画GIF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在您点击链接或在IE页面上提交表单后,是否有人知道制作动画GIF的动画仍在继续?这在其他浏览器中工作正常。

Does anyone know a work around to make animated GIF's continue to be animated after you click a link or submit a form on the page your on in IE? This works fine in other browsers.

谢谢。

推荐答案

接受的解决方案对我没有用。

The accepted solution did not work for me.

经过一些研究后,我遇到了一个这种解决方法,它确实有效。

After some more research I came across this workaround, and it actually does work.

这里是它的要点:

function showProgress() {
    var pb = document.getElementById("progressBar");
    pb.innerHTML = '<img src="./progress-bar.gif" width="200" height ="40"/>';
    pb.style.display = '';
}

和你的html:

<input type="submit" value="Submit" onclick="showProgress()" />
<div id="progressBar" style="display: none;">
    <img src="./progress-bar.gif" width="200" height ="40"/>
</div>

因此,在提交表单时,< img /> 标签被插入,并且由于某种原因它不受动画问题的影响。

So when the form is submitted, the <img/> tag is inserted, and for some reason it is not affected by the ie animation issues.

在Firefox中测试,ie6,ie7和ie8。

Tested in Firefox, ie6, ie7 and ie8.

这篇关于IE停止动画GIF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆