开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜