我有下面的两张图片。
它们是相同的图像,其中一个对文本有轻微的发光效果。
它们的设置如下:
<div id="header"><a></a></div>
原始图像是 div 的背景,“发光”图像是锚标签的背景,display:block; width: 100%; height: 100%;opacity: 0;
我正在使用下面的 jquery 代码
$('#header a').hover(
function() {$(this).animate({"opacity":"1"}, 1000);},
function() {$(this).animate({"opacity":"0"}, 1000);});
在悬停时淡入淡出锚图像。
这在 Firefox、chrome 等中运行良好。但是在 Internet Explorer 中,图像被赋予了纯黑色背景,并且具有透明度。
我怎样才能解决这个问题?
注意:我只担心 ie7/8 而不是 6。
http://webspirited.com/header-reachsniper.png http://webspirited.com/header-reachsniper-hover.png
更新
我已经决定这根本不值得我花时间在 Internet Explorer 上做。
然而,这在 ie9 中完美运行,所以我想对于少于 ie9 的浏览器会删除这种效果。