IE7/8 & 的淡入/淡出 jquery 问题PNG
嘿伙计们,我正在尝试制作一个放大镜背景,当使用悬停在可以放大的图像上时。这是使用空白范围并将其显示设置为无,直到悬停为止,并使其背景为半透明 png,中间有一个放大镜。
这是使用 fadeIn / fadeOut 完成的,并且在除 IE 之外的所有其他浏览器中都能完美运行。
在 IE 中,图像的背景会闪烁为深灰色,然后在悬停和悬停时淡出到正确的图像。
这是我正在处理的示例,它是连续的三个较小的图像:
http://www.brainbuzzmedia.com/themes/amplify/html/index.html
我读到解决方案是向正在褪色的元素添加背景颜色,但显然这不会'不起作用,因为我需要使用半透明的 png 作为背景。有人知道我能用这个做什么吗?
Hey guys, I am trying to make a magnifying glass background when the use hovers over an image that can be enlarged. This is using a blank span and setting its display to none until it is hovered, and having its background be a semi-transparent png with a magnifying glass in the center.
This is done using fadeIn / fadeOut and works perfectly in all of the other browsers besides IE.
In IE, the background of the image flashes to dark gray before fading to the correct image on hover and hover out.
Here is the example of what I am working on, its the three smaller images in a row:
http://www.brainbuzzmedia.com/themes/amplify/html/index.html
I have read that the solution to this is adding a background color to the element that is fading, but obviously that wouldn't work because I need to use a semi-transparent png as the background. Anyone have any idea what I can do with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我无法将闪光灯设置为深灰色。我能想到的解决方案是要么有另一个与图像大小相同的 div,绝对位于图像后面,并使用 png 背景。
或者
使用 IE 的
opacity
属性和 ms 过滤器。I don't get the flash to dark gray. What I can think of as a solution is either have another div the same size as the image positioned absolutely behind the image and have that use the png background.
OR
use the
opacity
property and ms filter for IE.我有类似的问题。
淡入/淡出后尝试调用:
当 IE 7 和 IE 7 时,它对我有用。 8 在执行淡入淡出效果后,在不透明度应有的位置留下了令人讨厌的黑色污迹。
I had a similar issue.
After the fadein / fadeout try calling:
It worked for me when IE 7 & 8 left nasty black smudges where the opacity should have been after doing a fade effect.
请参阅这篇文章,类似的问题:
jQuery IE Cleartype 淡出时出现故障!
技巧是使用延迟然后淡出。
See this article, similiar issue:
jQuery IE Cleartype glitch on fadeout!
The trick is to use a delay then fadeOut.