If I use the css filter property on the parent then It affecting the child too. I want to stop the child to not effect when I set the propert filter in parent.
article {
width: 300px;
height: 300px;
position: relative;
}
article:hover {
filter: contrast(110%);
}
img {
width: 300px;
height: 300px;
}
div {
width: 200px;
height: 50px;
background: #FCDBA3;
position: absolute;
bottom:0;
}
<article>
<img src="https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_960_720.jpg" />
<div></div>
</article>
If you noticed carefully! You can see when I hover over the article then the div tag also affecting because of the filter property. But I don't want the div to get affected when I hover over the article.
How can I achieve it?