Jump to content

Hover image with an animation effect

Recommended Posts

  • Replies 1
  • Views 520
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Posted (edited)

Add to Design > Custom CSS

/* Homge image hover */
div#page-section-61cead349673080e2f98cdf0 {
/* set overlay */
figure a:after {
    content: "";
    background-color: rgba(0,0,0,0.5);
    position: absolute;
    z-index: 900;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}
.image-block img {
    transition: all 0.5s;
}
/* show overlay on hover */
.image-block:hover figure a:after {
    opacity: 1;
}
figure a {
    position: relative;
}
.image-block:hover figure img {
    transform: scale(1.2);
}}

image.thumb.png.f6272a701f4ed24914e435b61ae486f7.png

Edited by tuanphan

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

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.