Jump to content

Image gallery hover to change image

Recommended Posts

  • Replies 3
  • Views 168
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 3/21/2022 at 6:57 PM, JJaston said:

Site URL: https://www.jjframes.com/inspiration

Hi There, 

I am hoping someone would be able to help, i would like to be able to hover over the images in my gallery and see another image. 

Is this possible and if so, how do i go about it?

Thanks

Joe

Add to Design > Custom CSS. Repeat Similar for other items

/* Gallery change image on hover */
body#collection-6220d396e197d347f65122cd {
.gallery-masonry figure:nth-child(1):hover img {
    content: url(https://cdn.pixabay.com/photo/2022/02/23/18/11/drink-7031154__480.jpg);
    height: 100% !important;
}
.gallery-masonry figure:nth-child(2):hover img {
    content: url(https://cdn.pixabay.com/photo/2021/12/21/08/29/owl-6884773__340.jpg);
    height: 100% !important;
}
.gallery-masonry figure:nth-child(3):hover img {
    content: url(https://cdn.pixabay.com/photo/2022/01/17/19/59/dog-6945696__340.jpg);
    height: 100% !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!)

Link to comment

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.