Recently, I've encountered a situation where I have an image with a button on top. My current task is to write some CSS code that will adjust the opacity of the image when hovering over the button.
This is what I came up with:
.wwdimg:hover {
opacity: 0.5;
}
<div>
<img src="http://via.placeholder.com/350x150">
<div><button class="wwdimg"> clickme </button></div>
</div>
However, after implementing this code, I noticed that instead of the image's opacity changing, it was actually the button's opacity that was affected.