nicolemak Posted November 30, 2021 Posted November 30, 2021 Site URL: http://nicolemak.com/ On my portfolio site, I have an index of images. Currently in the Page Styles feature, I am able to add a hover interaction so that the image decreases in opacity and shows text on hover. How do I add custom CSS so that I can make the images on the index appear in grayscale by default, then on hover, appear in colour? Thanks! Example of grayscale image, then colour image on hover.
Beyondspace Posted December 1, 2021 Posted December 1, 2021 20 hours ago, nicolemak said: Site URL: http://nicolemak.com/ On my portfolio site, I have an index of images. Currently in the Page Styles feature, I am able to add a hover interaction so that the image decreases in opacity and shows text on hover. How do I add custom CSS so that I can make the images on the index appear in grayscale by default, then on hover, appear in colour? Thanks! Example of grayscale image, then colour image on hover. Have you solved it yet? It seems fine on your site 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
nicolemak Posted December 1, 2021 Author Posted December 1, 2021 2 hours ago, bangank36 said: Have you solved it yet? It seems fine on your site Hi BaNgan, @bagank36 No I haven't yet! The images are displayed in colour by default, I would like to have them displayed in grayscale by default, then show colour on hover.
tuanphan Posted December 4, 2021 Posted December 4, 2021 @nicolemak Try adding to Design > Custom CSS div.index-section img { filter: grayscale(1); -webkit-filter: grayscale(1); } div.index-section:hover img { filter: grayscale(0); -webkit-filter: grayscale(0); } nicolemak 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
nicolemak Posted December 6, 2021 Author Posted December 6, 2021 On 12/3/2021 at 11:58 PM, tuanphan said: @nicolemak Try adding to Design > Custom CSS div.index-section img { filter: grayscale(1); -webkit-filter: grayscale(1); } div.index-section:hover img { filter: grayscale(0); -webkit-filter: grayscale(0); } Thank you @tuanphan!! This worked.
tuanphan Posted December 11, 2021 Posted December 11, 2021 On 12/7/2021 at 5:18 AM, nicolemak said: Thank you @tuanphan!! This worked. Just a small thing, when access your site, the browser says: Not secure. You should install SSL Certificates (SS provide this for free) https://support.squarespace.com/hc/en-us/articles/205815898-Understanding-SSL-certificates Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment