我想鼠标经过文字的时候黑色遮罩消失,为什么没有效果呢, .word_2:hover .zhezhao写的不对?谢谢!
<div class="videonews_2">
<img src="Images/light1.jpg" width="275px;" height="180px">
<div class="word_2">
<p><a href="#">市关工委到文化市场调研学习相关经验</a></p>
<span><a href="#"><img src="Images/bofang.gif" width="30" height="30"></a></span>
</div>
<div class="zhezhao">
</div>
</div>
css
.videonews_2{ position:relative;}
.word_2{
width: 275px;
height: 50px;
background: rgba(0,0,0,0.7);
filter: alpha(opacity=70);
z-index: 1000;
position: absolute;
left: 0px;
top: 131px;
}
.word_2 p a{ display:block; color:#EEE; margin-left:10px; width:230px; margin-top:11px; line-height:15px; }
.word_2 span{
position: absolute;
left: 238px;
top: 11px;
z-index:1000;
}
.zhezhao{
position: absolute;
width: 275px;
height: 180px;
background: rgba(0,0,0,0.8);
filter: alpha(opacity=80);
z-index: 1500px;
left: 1px;
top: 0px;
opacity:1;
}
.word_2:hover .zhezhao{ opacity:0;}
哥们就不能上个在线看的地址麽,这是你要的效果吧http://sandbox.runjs.cn/show/wpev2kkq
你把最后一行的
.word_2:hover .zhezhao{ opacity:0;}
改成.zhezhao:hover{ opacity:0;filter: alpha(opacity=0);}
就好了,你这css选择器的写法有问题,你要去掉遮罩,肯定是要在
.zhezhao
用:hover改变透明度啦!