Jump to content

Show Title and reveal subtitle on hover

Recommended Posts

Site URL: https://www.sourdoughsocial.com/services

I am hoping to have the titles for my images to SHOW when you first launch the page, but then when you hover over, would like to have the text change to subtitle. 

 

An example of what I would like to do is on this page (scroll down to the twin images, entitled "Creative" and "Performance"): 

https://spherical.co/about/

(And yes, I realize this is not a squarespace site...)

 

Here is the code that I have built on the back end, which has the hover text, but it makes it ALL hovered.
Currently have it on collection ID for only my "Services" page. 

 

#collection-5e7bba06be11fc596290cc91

{

.design-layout-poster .image-card-wrapper {

  visibility: hidden;

  opacity: 0;

  transition-duration: .35s;

}

 

.design-layout-poster:hover .image-card-wrapper {

  visibility: visible;

  opacity: 1;

  background-color: hsla(275, 30%, 72%, 0.64)

  }

}

 

 

 

Thanks in advance for your help! 

Link to comment
  • Replies 2
  • Views 1.5k
  • Created
  • Last Reply

Remove above code. and Use this code

/* hide sub title */
div#page-5e7bba06be11fc596290cc91 .image-subtitle-wrapper {
    opacity: 0;
    transition: all ease-in-out 0.5s;
}
/* show sub title on hover */
div#page-5e7bba06be11fc596290cc91 .image-block:hover .image-subtitle-wrapper {
    opacity: 1;
    transition: all ease-in-out 0.5s;
}

 

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
8 minutes ago, tuanphan said:

Remove above code. and Use this code


/* hide sub title */
div#page-5e7bba06be11fc596290cc91 .image-subtitle-wrapper {
    opacity: 0;
    transition: all ease-in-out 0.5s;
}
/* show sub title on hover */
div#page-5e7bba06be11fc596290cc91 .image-block:hover .image-subtitle-wrapper {
    opacity: 1;
    transition: all ease-in-out 0.5s;
}

 

This is excellent!!! thank you SO much!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.