Jump to content

How to create list image hover effects

Recommended Posts

Posted

Hi, 

I am trying to create a list item hover effect. I'd like all images to be black and white and turn back to color on hover. I'm using the following code, which is working for the black and white effect. However, it's not transitioning to color on hover. 

section[data-section-id="61f056b8625ae6798a21c5d0"]
 .list-item .list-image 
{filter: grayscale(100%);}
 .list-item:hover .list-image 
{filter: grayscale(0%);}

 

Finally, I'd also like the transition to be smooth, so maybe take half a second.

This is the website: https://biosymetricswebsite.squarespace.com/

Do you have any suggestions?

 

Thank you!

Posted
On 1/26/2022 at 5:10 AM, Yolandi said:

Hi, 

I am trying to create a list item hover effect. I'd like all images to be black and white and turn back to color on hover. I'm using the following code, which is working for the black and white effect. However, it's not transitioning to color on hover. 

section[data-section-id="61f056b8625ae6798a21c5d0"]
 .list-item .list-image 
{filter: grayscale(100%);}
 .list-item:hover .list-image 
{filter: grayscale(0%);}

 

Finally, I'd also like the transition to be smooth, so maybe take half a second.

This is the website: https://biosymetricswebsite.squarespace.com/

Do you have any suggestions?

 

Thank you!

Can you share the direct link to this page?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted

I was able to get the correct code from Tuan, see below!

 

Add this CSS
/* Team page image color on hover */
.user-items-list-item-container[data-section-id="61f056b8625ae6798a21c5d0"] li:hover img {
    filter: initial !important;
}
 
Thank you!
 

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.