MishaY Posted May 21, 2022 Share Posted May 21, 2022 Site URL: https://www.mishayeung.com hi, I'm trying to make an image darken when the mouse hovers over it, rather than lighten to the color of the background But it doesn't work successfully in Gallery and List of images my code is here: /* Hover Effects - list */ .list-item img { transition: all .5s ease-in-out;} .list-item:hover img { background-color: black; opacity: 0.8; transition: all .5s ease-in-out;} /* Hover Effects - gallery */ .gallery-grid-item-wrapper img { transition: all .5s ease-in-out;} .gallery-grid-item-wrapper:hover img { background-color: black; opacity: 0.8; transition: all .5s ease-in-out;} Link to comment
tuanphan Posted May 21, 2022 Share Posted May 21, 2022 Hi, Hover image >> Show overlay only or show overlay + title? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
MishaY Posted May 21, 2022 Author Share Posted May 21, 2022 11 minutes ago, tuanphan said: Hi, Hover image >> Show overlay only or show overlay + title? hi, show overlay only thanks for your help Link to comment
tuanphan Posted May 23, 2022 Share Posted May 23, 2022 On 5/21/2022 at 3:59 PM, MishaY said: hi, show overlay only thanks for your help Add to Design > Custom CSS body.homepage { figure.gallery-grid-item { position: relative; } .gallery-caption { position: static; } /* overlay */ .gallery-grid-item-wrapper a:after { background: #f4f6ea; /* overlay color */ content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity ease 200ms !important; } .gallery-grid-item:hover .gallery-grid-item-wrapper a:after { opacity: 0.75; } /* remove gap */ figcaption { padding: 0 !important; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
MishaY Posted May 23, 2022 Author Share Posted May 23, 2022 2 hours ago, tuanphan said: Add to Design > Custom CSS body.homepage { figure.gallery-grid-item { position: relative; } .gallery-caption { position: static; } /* overlay */ .gallery-grid-item-wrapper a:after { background: #f4f6ea; /* overlay color */ content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity ease 200ms !important; } .gallery-grid-item:hover .gallery-grid-item-wrapper a:after { opacity: 0.75; } /* remove gap */ figcaption { padding: 0 !important; } } It works! Thank you so much! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment