0
我在离子创建一个应用程序,我有两个图片在主页上。背景图像上有灰色滤镜。当用户选项卡将不透明度从0.7更改为0.4时,我希望在悬停时进行此操作。但代码:悬停在Css中不起作用。这里是我的代码片段悬停在离子div
<a class="col-50 div2" ui-sref="belege">
<div class="opaq-bg"></div>
<span>Belege</span>
</a>
这里的css文件
#home .div1{
background-image: url(../img/checkliste.jpg);
color: #fff;
text-decoration: none;
}
#home .div2{
background-image: url(../img/belege.jpg);
color: #fff;
text-decoration: none;
}
.opaq-bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(68, 68, 68, 0.7);
z-index: 0;
}
.opaq-bg:hover {
background-color: rgba(68, 68, 68, 0.4);
}