Yolandi Posted January 25, 2022 Posted January 25, 2022 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!
Beyondspace Posted January 29, 2022 Posted January 29, 2022 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
Yolandi Posted January 29, 2022 Author Posted January 29, 2022 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! tuanphan 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment