Jump to content

Overlay image on hover in gallery Lightbox

Recommended Posts

Posted

Hello!

I am trying to create an overlay with an image inside of a gallery Lightbox, so that when the user hovers over the image, this overlay appears. I managed to do it in this gallery: https://www.fernandacortina.com/limited-editions for the grid itself, but on another page I want this same effect inside of the Lightbox only. I already have another hover effect for the grid in place.

The page I need help with is: https://www.fernandacortina.com/gallery

I've tried a couple of snippets of CSS but none of them have worked except to place an image on top of the Lightbox, but can't figure out how to get the hover effect and how to get that image overlay to repeat so it covers the whole image. 

  • Replies 1
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

You can use this code to Website > Website Tools > Custom CSS

/* Lightbox hover */
.gallery-lightbox-item-wrapper:after {
    opacity: 0;
}
figure:hover .gallery-lightbox-item-wrapper:after {
    opacity: 1;
}
figure.gallery-lightbox-item {
    pointer-events: initial !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.