jQuery fadeIn 在 IE 中的图像上创建白点/斑点
这实在是让我抓狂了。我有一位客户必须让他的网站在 IE 中的运行方式与其他浏览器(如 FF、Chrome 和 Safari)的运行方式完全相同,但我似乎无法让 IE 发挥作用。
以下是我正在处理的网站的登录详细信息:
u: millbank
p: 123654
在 IE 中查看此页面:
http://tiger.directrouter .co.uk/~millbank/?page_id=21
加载时,您会看到 RHS 上的图像上出现白点,并且第一个引言不会像应有的那样淡入。
我有 IE 的 CSS 条件,并尝试向 #bgimg div 添加纯色背景,但看起来没有什么区别。
还有什么我可以尝试的吗? (请)...
谢谢
osu
This is really driving me up the wall. I've got a client who has to have his site work exactly the same in IE as other browsers that actually work like FF, Chrome and Safari, but I can't seem to get IE to play ball.
Here are the log in details for the site I'm working on:
u: millbank
p: 123654
Have a look at this page in IE:
http://tiger.directrouter.co.uk/~millbank/?page_id=21
You'll see white spots appear on the image on the RHS on load and the first quote doesn't fade in as it should do.
I have conditionals for CSS for IE and have tried adding a plain colour background to the #bgimg div, but it makes no difference it seems.
Is there anything else I can try? (please)...
Thanks
osu
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能和IE的过滤器有关。请参阅 http://www.dynamicdrive.com/forums/showpost。 php?p=161962&postcount=3 解决类似问题。
It may have to do with IE's filters. See http://www.dynamicdrive.com/forums/showpost.php?p=161962&postcount=3 for a similar issue.
你没有指定你使用的IE版本,但我怀疑是IE8,对吧? (或更低?)
IE8 对透明度的支持极其糟糕。它使用非标准方法来实现它,并且在很多情况下给出质量较差的结果,特别是当它与图像而不是文本结合使用时。
JQuery 做了一项令人难以置信的工作,将浏览器之间的差异从开发人员手中抽象出来,但它实际上无法修复 IE 中像这样从根本上被破坏的功能。
最重要的是,这可能是你必须忍受的事情。如果您想使用
fadeIn()
,要么避免图像淡入淡出,要么接受它在 IE 中看起来会被破坏的事实。通过微调图像本身可以在一定程度上缓解问题 - 如果您有任何纯黑或纯白的像素,请尝试调整它们,使它们不再是纯黑或纯白;这可能会有所帮助。但即使图形经过完美调整,IE 仍然可能会出现令人痛苦的错误,因此即使它在这种情况下对您有用,也请不要认为这是完美的解决方法。
您可以尝试的另一件事(但同样不能保证解决 IE 的所有问题)是,如果您要淡入包含图像和其他元素的块,则将图像与其余内容分开淡入。
You haven't specified the IE version you're using, but I suspect IE8, right? (or lower??)
IE8 has appallingly bad support for transparency. It uses non-standard ways of achieving it, and gives poor quality results with it in a lot of cases, especially when it is used in conjunction with images, rather than text.
JQuery does an incredible job of abstracting the differences between browsers away from the developer, but it can't actually fix features in IE that are fundamentally broken like this one.
The bottom line is that this may be something you just have to live with. If you want to use
fadeIn()
, either avoid fading in images, or accept that it's going to look busted in IE.It is possible to mitigate the problems to some degree by fine tuning the images themselves - if you have any pixels which are solid black or white, try adjusting them so they're not quite pure black or white; this may help. But even with a perfectly adjusted graphic, IE can still get things painfully wrong, so even if it does work for you in this case, please don't consider that to be perfect cure.
Another thing you can try (but again not guaranteed to solve all of IE's problems) is if you're fading in a block which contains images and other elements, then do the fade in for the image separately to the rest of the content.