I have an image carousel and I've managed to add an overlay to the images with this code, but I'm unable to get the overlay to fade away (to fully reveal the image) on hover. Here's my code:
[data-section-id="66a40336cbf7aa0badff5f3c"] .user-items-list-carousel__media-inner::after {
background: rgba(0,0,0, .4) !important;
content: '';
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 1;
transition: opacity 0.5s ease; /* Fade effect on hover */
}
[data-section-id="66a40336cbf7aa0badff5f3c"] .user-items-list-carousel__media-inner:hover::after .user-items-list-carousel__media-inner:focus::after {
opacity: 0;
transition: opacity 0.5s ease;
}
Can you please advise how to make the overlay fade away on hover? Thanks.