Jump to content

Smooth hover transition on Gallery

Recommended Posts

Hello everyone,

Please lend me your help.

Upon hover, my gallery images zooms in and out, the zoom in transition is smooth but the zoom out effect is rather sudden so the end result looks jumpy. Here is the code I used:

.gallery-grid-item
img:hover{ 
transform:Scale(1.1);
transition-duration: 1s;
}

.gallery-grid-item 
{overflow:hidden!important }

Please someone tell me what I did wrong in my code.

Here is the link to my gallery:
https://www.ptphotography.com/stmoritz-badrutts-palace-hotel-switzerland

For reference, we want to achieve the same smooth transition like this product page:
https://www.ptphotography.com/destination-trial

I used the same code for the product and gallery page but I don't know why they have different effect. Please help 🙏

Thank you in advance,
Kind regards,
K

Link to comment
4 hours ago, Ptphotography said:

Hello everyone,

Please lend me your help.

Upon hover, my gallery images zooms in and out, the zoom in transition is smooth but the zoom out effect is rather sudden so the end result looks jumpy. Here is the code I used:

.gallery-grid-item
img:hover{ 
transform:Scale(1.1);
transition-duration: 1s;
}

.gallery-grid-item 
{overflow:hidden!important }

Please someone tell me what I did wrong in my code.

Here is the link to my gallery:
https://www.ptphotography.com/stmoritz-badrutts-palace-hotel-switzerland

For reference, we want to achieve the same smooth transition like this product page:
https://www.ptphotography.com/destination-trial

I used the same code for the product and gallery page but I don't know why they have different effect. Please help 🙏

Thank you in advance,
Kind regards,
K

Move the transition property like so

.gallery-grid-item:hover img { 
		transform:Scale(1.1);
}
.gallery-grid-item img {
  		transition-duration: 1s;
}
.gallery-grid-item {
  	overflow: hidden!important;
}

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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.