css opacity - internet explorer
i'm working with opacity today and from some reason it wont work on internet explorer
here is my CSS :
.box_1{opacity:0.4;filter:alpha(opacity=40)};
.box_1:hover{opacity:1.0;filter:alpha(opacity=100);}
and here is my HTML:
<div class="box_1">
<img src="abc.png"/>
</div>
the HOVER d开发者_开发知识库iv does not work. what is the problem here?
You're missing a curly bracket at the end of your first line, it should be:
.box_1{opacity:0.4;filter:alpha(opacity=40);}
.box_1:hover{opacity:1.0;filter:alpha(opacity=100);}
Also if you're using IE6 the :hover
selector won't work on anything except <a>
tags. To get around it you'll need to use something like Whatever:hover.
精彩评论