Jump to content

Enlarge photo on mouse hover

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hey! 

I've been trying to enlarge my photos (with links) a little when being hovered over with a mouse. I've tried some CSS codes I found here, but they don't seem to work. Is there anyone that can help me out with this problem? Would highly appreciate it! 

website: www.dahliah.com
pw: getmein

  • Replies 13
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Thanks! That did work although I am curious if it's also possible to make the picture bigger on hover.
How it zooms in but the edges stay the same (if you get what i mean). Any solution for that? Thanks mate! 

Posted
On 1/14/2024 at 5:47 PM, dahliah said:

Thanks! That did work although I am curious if it's also possible to make the picture bigger on hover.
How it zooms in but the edges stay the same (if you get what i mean). Any solution for that? Thanks mate! 

I don't quite understand... if you know an example, I can imagine it 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!)

  • Solution
Posted
On 1/18/2024 at 12:45 AM, dahliah said:

Thanks for the reply! This website describes what I mean, hope this helps! 
 https://www.w3schools.com/howto/howto_css_zoom_hover.asp
 

Use this new code

div.image-block:hover {
    transform: scale(1.3);
    transition: all 0.3s;
}
div.image-block {
    transition: all 0.3s;
}

 

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

  • 10 months later...
Posted

I'm trying to do the same thing... enlarge the product images on hover. Those codes didn't work for me. Any thoughts? I'm new to CSS so may need baby steps 🙂

 

kangaroo-cheetah-r3b5.squarespace.com

Posted
Here are the section ID's if that helps:
 
section[data-section-id="670e7958bcc6446596295c37"]
 
section[data-section-id="6717d18ff02fd270e2994808"]
 
section[data-section-id="670e78f8d42c6b61fc4ef357"]
 
section[data-section-id="670e7c87b0334c7e57a464a7"]
 
section[data-section-id="670e798aa30fbd11524d4457"]
 
section[data-section-id="670ddfebbe354a34072c08c1"]
Posted
39 minutes ago, AmyKant said:

I'm trying to do the same thing... enlarge the product images on hover. Those codes didn't work for me. Any thoughts? I'm new to CSS so may need baby steps 🙂

 

kangaroo-cheetah-r3b5.squarespace.com

You can use this to Custom CSS box

body.homepage {
    li.list-item:hover img {
        transform: scale(1.3);
        transition: all 0.3s ease;
    }
    li.list-item img {
        transition: all 0.3s ease;
    }
}

 

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

Posted

Adding to this, the client wants each of the images on the product pages (i.e. cable railings, driveway gates etc) to enlarge/scale on hover. 

 

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.