IE 中的动画 GIF 停止 [英] Animated GIF in IE stopping
问题描述
有没有人知道在您在 IE 中单击链接或提交页面上的表单后,使动画 GIF 继续保持动画效果的解决方法?这在其他浏览器中运行良好.
谢谢.
接受的解决方案对我不起作用.
经过更多研究后,我发现了 这个解决方法,它确实有效.
这是它的要点:
function showProgress() {var pb = document.getElementById("progressBar");pb.innerHTML = '<img src="./progress-bar.gif" width="200" height ="40"/>';pb.style.display = '';}
并在您的 html 中:
<div id="progressBar" style="display: none;"><img src="./progress-bar.gif" width="200" height ="40"/>
所以当表单提交时,插入了标签,并且由于某种原因它不受ie动画问题的影响.
在 Firefox、ie6、ie7 和 ie8 中测试.
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.
Thanks.
The accepted solution did not work for me.
After some more research I came across this workaround, and it actually does work.
Here is the gist of it:
function showProgress() {
var pb = document.getElementById("progressBar");
pb.innerHTML = '<img src="./progress-bar.gif" width="200" height ="40"/>';
pb.style.display = '';
}
and in your html:
<input type="submit" value="Submit" onclick="showProgress()" />
<div id="progressBar" style="display: none;">
<img src="./progress-bar.gif" width="200" height ="40"/>
</div>
So when the form is submitted, the <img/>
tag is inserted, and for some reason it is not affected by the ie animation issues.
Tested in Firefox, ie6, ie7 and ie8.
这篇关于IE 中的动画 GIF 停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!