Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Smooth hover transition on Gallery


Ptphotography

Question

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 post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

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!impo

2 answers to this question

Recommended Posts

  • 1
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 BaNgan from 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 lightboxGeolocation Automatic Currency Converter, Sortable Table from GSheet
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 post
  • 0
3 hours ago, bangank36 said:

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;
}

 

@bangank36 This is amazing! It worked as expected. Thank you for your help.

Stay safe always,
K

Link to post

Create an account or sign in to comment

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


×
×
  • Create New...