Jump to content

Disabling Crop and Zoom on some images

Recommended Posts

Hi there,

Stumbled across this code for crop/zoom of images. 

Works a treat. 

But... there are some images I don't want this to apply to. 

Once I've identified relevant image ID, does anyone have any idea what 
to include within CSS to exclude relevant images?

Thanks,
Marc

----


//Crop and Zoom Image Hover


.intrinsic, .summary-thumbnail-outer-container, .blog-item > div:first-child {
  -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
          clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  -webkit-transition: all .3s ease;
  -o-transition: all .3s ease;
  transition: all .3s ease;
  img {
    -webkit-transform: scale(1);
        -ms-transform: scale(1);
            transform: scale(1);
    -webkit-transition: all .3s ease!important;
    -o-transition: all .3s ease!important;
    transition: all .3s ease!important;
  }
  &:hover {
    -webkit-clip-path: polygon(3% 3%, 97% 3%, 97% 97%, 3% 97%);
            clip-path: polygon(3% 3%, 97% 3%, 97% 97%, 3% 97%);
    img {
      -webkit-transform: scale(1.1);
          -ms-transform: scale(1.1);
              transform: scale(1.1);
    }
  }
}
Link to comment
  • Replies 2
  • Views 426
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.