Jump to content

Color Overlay on Hover for Image (NOT a gallery)

Recommended Posts

Hello!! I am looking to create a 50% opacity white hover effect on a few images (not a gallery). I tried to use this code but it doesn't work 🤨

.image-block {
    img {
      opacity: 1;

transition: .3s ease;
    }
   
    img:hover {
      opacity: .5;
    }
  }

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Try this Custom CSS instead:

.image-block img {
  opacity: 1;
  transition: .3s ease;
}   
.image-block img:hover {
  opacity: 0.5;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
⬛ SquareWebsites Plugins (Referral link)
✨ Spark Plugin (Referral link) 

☕ Did I help? Buy me a coffee?

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.