Jump to content

Portfolio Grid black and white hover to colour

Recommended Posts

Hi, how do I add a code to a portfolio layout page for the grid images to be black and white and for each to appear in colour only when hovered over after 2 seconds or so? I have tried adding codes to the specific pages advanced section but it just appears as text in the header and nothing changes. Please help!

Link to comment
  • Replies 8
  • Views 2.2k
  • Created
  • Last Reply

Top Posters In This Topic

2 hours ago, rp7 said:

Can you actually let me know in the instance of this also please! Would like to try both

Initial: Image in Black color, No text

Hover: Image in Full Color, with text

What is your site url? We can check easier

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
On 6/22/2022 at 4:51 PM, rp7 said:

To achieve this, you need to use original is fullcolor, then we will use code to invert its color with this code

a.grid-item img {
    filter: grayscale(1);
    -webkit-filter: grayscale(1);
}
a.grid-item:hover img {
    filter: grayscale(0);
    -webkit-filter: grayscale(0);
}
.portfolio-grid-overlay .grid-item:hover .portfolio-title {
    display: block !important;
}

 

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
  • 1 year later...
On 6/23/2022 at 3:12 PM, tuanphan said:

To achieve this, you need to use original is fullcolor, then we will use code to invert its color with this code

a.grid-item img {
    filter: grayscale(1);
    -webkit-filter: grayscale(1);
}
a.grid-item:hover img {
    filter: grayscale(0);
    -webkit-filter: grayscale(0);
}
.portfolio-grid-overlay .grid-item:hover .portfolio-title {
    display: block !important;
}

 

how to apply this to the mobile version as well ?

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.