Jump to content

image hover effect: zoom-in/out 'distorts' images when reloading page

Recommended Posts

Site URL: https://clover-duck-epye.squarespace.com/config/pages

Hi All,

I have been struggling with creating a smooth zoom-in hover effect over images (block image poster layout) and a smooth zoom-out when not hovering. This works now which is great. Unfortunately when reloading my page, the images start out distorted and slowly get back to normal (the duration of my hover effect...). Any help would be much appreciated!

Thanks in advance!

My custom css:
/* Zoom on hover image*/
.sqs-block-image .design-layout-poster{
  -webkit-transition: all 4s ease;
  -o-transition: all 4s ease;
  transition: all 4s ease;  
img{
-webkit-transform: scale(1);
    -ms-transform: scale(1);
       transform: scale(1);
-webkit-transition: all 4s ease!important;
-o-transition: all 4s ease!important;
transition: all 4s ease!important;
}
&:hover img{
-webkit-transform: scale(1.15);
-ms-transform: scale(1.15);
transform: scale(1.15);
 }
}

 

Link to comment
  • Replies 3
  • Views 469
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.