Jump to content

Enlarge photo on mouse hover

Go to solution Solved by tuanphan,

Recommended Posts

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

Link to comment
  • Replies 6
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

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! 

Link to comment
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!)

Link to comment
  • Solution
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!)

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.