Jump to content

Hover effect on image and caption below at same time

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

I'm creating a home page with some linked images including captions below. The CSS below gives the images a hover effect, but nothing happens to the captions. Is it possible to give the cations a similar effect (or change color or something) at the same when the hover effect is activated?
 

#block-40b84df9ad7a77f5ea51 {
  a:hover img {
    transform: scale(1.04); 
    opacity: 0.8;
    transition: .4s
}
}

Edited by Jari-vh
  • Replies 7
  • Views 315
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

I made this to clarify what I mean. Now I have two effects that work independently from each other, but I would like to have them active at the same time (when I hover on the image or text).

Schermafbeelding 2022-05-14 om 12.18.59.png

Edited by Jari-vh
  • Solution
Posted
21 hours ago, Jari-vh said:

I made this to clarify what I mean. Now I have two effects that work independently from each other, but I would like to have them active at the same time (when I hover on the image or text).

Schermafbeelding 2022-05-14 om 12.18.59.png

Add to Design > Custom CSS

div#page-section-626b0282967e664d4bdc3044 {
img, h3 {
    transition: all 0.3s !important;
}
.image-block:hover a {
    color: #76f089 !important;
    transition: all 0.3s;
}
.image-block:hover img {
    transform: scale(1.4);
    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!)

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.