CSS 不透明度 - 互联网浏览器
我今天正在处理不透明度,由于某种原因它无法在 Internet Explorer 上工作,
这是我的 CSS:
.box_1{opacity:0.4;filter:alpha(opacity=40)};
.box_1:hover{opacity:1.0;filter:alpha(opacity=100);}
这是我的 HTML:
<div class="box_1">
<img src="abc.png"/>
</div>
HOVER div 不起作用。 这里有什么问题吗?
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 div does not work.
what is the problem here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在第一行末尾缺少一个大括号,它应该是:
此外,如果您使用 IE6,则
:hover
选择器将不适用于除之外的任何内容;
标签。要解决这个问题,您需要使用类似 Whatever:hover 的东西。You're missing a curly bracket at the end of your first line, it should be:
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.