Jump to content

Hover customisation for an image

Go to solution Solved by SquareRefresh,

Recommended Posts

Hi guys, site is not live yet so I cant put URL down but was wondering what code is required to unblur a photo when a mouse hovers over it. I've attached some screenshots for reference.

Basically, I want the images with the overlay text to be blurred until the mouse hovers over, where then I want the image to not be blurry. Is this possible?

Thanks!!

Blur before hover.png

unblur after hover.png

Link to comment
38 minutes ago, dekiv said:

Basically, I want the images with the overlay text to be blurred until the mouse hovers over, where then I want the image to not be blurry. Is this possible?

Hey @dekiv You can use css option filter: blur() https://developer.mozilla.org/ru/docs/Web/CSS/filter-function/blur() , so css code might be:

.image {
  filter: blur(4px);

  &:hover {
    filter: blur(0);
  }
}

 

SquareRefresh, premium plugins & templates that have an elevated feel.

Plugins: Have your site stand out. 
Templates: Our templates are designed with versatility in mind.
Get Freebies: Sometimes things in life are free. Browser our hand selected free plugins.

Link to comment
7 minutes ago, dekiv said:

Thanks for that but I have never used Squarespace before. Where do I input the CSS for that particular page and section?

Add Your code to the Design > Custom CSS

SquareRefresh, premium plugins & templates that have an elevated feel.

Plugins: Have your site stand out. 
Templates: Our templates are designed with versatility in mind.
Get Freebies: Sometimes things in life are free. Browser our hand selected free plugins.

Link to comment
5 minutes ago, dekiv said:

Yeah I copied in the code you sent above but it didnt do anything different?

Ofc, it's just an example, You should to add correct selector instead of my .image class.

SquareRefresh, premium plugins & templates that have an elevated feel.

Plugins: Have your site stand out. 
Templates: Our templates are designed with versatility in mind.
Get Freebies: Sometimes things in life are free. Browser our hand selected free plugins.

Link to comment
  • Solution
9 minutes ago, dekiv said:

Yeah I've tried putting in the correct class but it just blurs the whole page. Not sure what I'm missing here.

Site is live now as well - www.harissabp.com.au (What We Do) section

Try to add next code:

[data-section-id="61d3f19180af5560d20173f6"] .grid-item:not(:hover) .grid-image-inner-wrapper {
  filter: blur(4px);
}

Let me know if it works for You.

SquareRefresh, premium plugins & templates that have an elevated feel.

Plugins: Have your site stand out. 
Templates: Our templates are designed with versatility in mind.
Get Freebies: Sometimes things in life are free. Browser our hand selected free plugins.

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.