Jump to content

Black & white portfolio - when the mouse is moved over the image, it becomes colored

Recommended Posts

Hello everyone, 

I'd like to know if it's possible to change the images on the exposed projects when the mouse moves over them. 
Is it possible, for example, to have images that at first glance are all in black and white, and when we move the mouse over them the image changes to become colored? You can find attached an example.

Thank you in advance for your invaluable help. 

Capture d’écran 2024-08-20 à 12.12.16.png

Capture d’écran 2024-08-20 à 12.12.21.png

Link to comment
  • Replies 11
  • Views 510
  • Created
  • Last Reply

Top Posters In This Topic

I found this code : 

list-item-content { margin-top:-58%; background:linear-gradient(to bottom, rgba(0,0,0,0),rgba(0,0,0,.5) 25%, #000 75%); padding: 1rem; transition: all 1s; z-index:99; opacity:0} .list-item:hover .list-item-content { transition: all 1s; opacity:1}.list-item-content *{color:#FFF!important} .list-item-media {transition: all 1s;filter:grayscale(1);}.list-item:hover .list-item-media {transition: all 1s;filter:grayscale(0)!important;}

but I don't know where I have to copy that code 

Link to comment

I found on YouTube this code below and its workin 

.image-block { filter: grayscale(100%);} .image-block:hover { filter: none;} 
.image-block { filter: grayscale(100%); transition: filter .5s ease-in-out;}  .image-block:hover { filter: none;} 

But now I want this code to affect only one page of my website, but I can't find it at the moment. 

Thanks in advance for your help

Link to comment

You can add Page ID before the code, something like this

#enter-page-id {
.image-block { filter: grayscale(100%);} .image-block:hover { filter: none;} 
.image-block { filter: grayscale(100%); transition: filter .5s ease-in-out;}  .image-block:hover { filter: none;} 
}

Use this code to find Page ID

 

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!)

Link to comment
20 hours ago, Rmng_ said:

Yes in fact. how can you make this effect on squarespace? Do I need css ? 

I see it already have this here, or if it is not your site, you can share link to your site, I can check easier

https://vincentcoste.com/work-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!)

Link to comment

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.