img:悬停不起作用于ie [英] img:hover not working in ie

查看:95
本文介绍了img:悬停不起作用于ie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

css:

  .myim {
width:50;
身高:50;
}
.mydiv {
float:right;
位置:绝对;
-index:2;
}
.myim:hover {
width:50;
身高:50;
位置:绝对;
z-index:2;
filter:alpha(opacity = 95);
filter:alpha(opacity = 95)!important;
不透明度:0.98!重要;
-moz-opacity:11;

html:

 < div class ='mydiv'> 
< a href =#>< img class ='myim>< / a>
< / div>

我希望当图片上的鼠标悬停完成时,它应该有一点透明度。 p>

以上代码在FF中运行良好,但在IE中无法运行。



p>

解决方案

自从我记得以后,IE并没有确定悬停标记是否为非标记。


css:

.myim { 
    width:50; 
    height:50;
}
.mydiv { 
    float:right; 
    position:absolute; 
    -index:2;
}
.myim:hover {
    width:50;
    height:50;
    position:absolute;
    z-index:2;
    filter:alpha(opacity=95);
    filter:alpha(opacity=95) !important;
    opacity: 0.98 !important; 
    -moz-opacity:11;
}

html:

<div class='mydiv'>
  <a href="#"><img class='myim'></a>
</div>

I want that whenever the mouseover is done on the image it should have little bit of transparency.

All above coding works well in FF, but it's not working in IE at all.

Thanks in advance

解决方案

Since I remember, IE doesn't identify hover for non-a tags.

这篇关于img:悬停不起作用于ie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆