IE 中图片闪烁
我在使用 IE6 时遇到问题:每次将鼠标悬停在图像上时,图像都会重新加载并闪烁。
这是因为 IE 有一个选项“检查存储页面的新版本”一直”,基本上是“一直重新加载所有内容”。
我在谷歌上发现了一些修复:
添加
<meta http-equiv="Page-Enter" content="revealtrans(duration=0.0)" />
<meta http-equiv="Page-Exit" content="revealtrans(duration=0.0)" />
但这对我不起作用至此结束。
还有其他修复,例如 http:// Fivesevensix.com/studies/ie6flicker/ 但它并不真正适用于我。 图像闪烁是一个精灵,但它会在某些 JS 事件上发生变化(所以我不能真正使用“复制图像”黑客),它也相当小,因此“元素的像素区域”黑客不起作用。
最后还有涉及服务器端缓存的黑客攻击,但我觉得这有点矫枉过正,应该有一种更简单的方法来做到这一点。 此外,我总是最终在部署在不同类型服务器上的网站上工作,并且每次都必须在服务器上修复它,这将是痛苦的。
你知道这个问题的解决办法吗? 标签解决方案听起来如此完美和简单,为什么它对我不起作用? 我希望能够避免重写大量 CSS/JS 来解决这个问题,但我会采取任何客户端修复。
谢谢 !
I am facing an issue with IE6 : every time I mouse over an image the image will reload and flicker.
This is due to the fact that IE has an option "check new version of stored pages all the time" which is basically "reload everything all the time".
I found some fixes on google :
Adding
<meta http-equiv="Page-Enter" content="revealtrans(duration=0.0)" />
<meta http-equiv="Page-Exit" content="revealtrans(duration=0.0)" />
via webmasterworld
But this doesn't work on my end so far.
There are also other fixes, like http://fivesevensix.com/studies/ie6flicker/ but it doesn't really apply to me. The image flickering is a sprite but it will change on certain JS events (so I can't really use "Duplicate the image" hacks), it is also fairly small so the hack "Pixel area of element" doesn't work.
Finally there are hacks involving server side caching, but I feel like it's overkill and there should be a simpler way to do it. Also I always end up working on websites deployed on different kind of servers and having to fix it on the server each and every time would just be painful.
Do you know a solution to this problem? The tag solution sounded so perfect and simple, how come that it's not working on my end? I'd love to be able to avoid re-writing a lot of CSS/JS in order to fix this, but I'd take any client side fixes.
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将此代码段放在 global.js 文件中,并将其包含在我的所有页面上:
更多信息 可在此处获取。
I place this snippet in a global.js file and include that on all of my pages:
More information available here.