I have problem with my css code.
As you see I have filter on li element, but it's overlays other elements. I need to make other two elements had no filter:
Is there any possibility to do so.
.main {
width:300px;
height:300px;
background-color:blue;
list-style:none;
}
.button {
position: absolute;
top: 35% ;
height: 30px;
width: 120px;
display: none;
z-index: 99;
background-color:black;
color:white;
}
.icon {
width: 30px;
position: absolute;
z-index: 99;
display: none;
width:100px;
}
.main:hover > .button {
display: block;
filter: none;
}
.main:hover > .icon {
display: block;
filter: none;
}
.main:hover {
filter: brightness(50%);
transition: 0.5s;
}
<li class="main">
<img src="https://help.seesaw.me/hc/en-us/article_attachments/204081043/bear.png" class="icon" />
<a class="button" href="#">Button</a>
</li>