Jump to content

Change gallery images on hover - 7.0 version

Go to solution Solved by tuanphan,

Recommended Posts

  • LewisEisenburg changed the title to Change gallery images on hover - 7.0 version
  • Replies 3
  • Views 239
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

You can use this code to Website > Website Tools > Custom CSS. Repeat similar for other items.

article a[href="/onpay"]:hover img {
    content: url(https://cdn.pixabay.com/photo/2021/11/03/08/24/baskets-6765014_1280.jpg);
}

 

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
23 hours ago, LewisEisenburg said:

@tuanphan Amazing thank you this works perfectly.

Is there a way to also change the title text on hover at the same time? So for the OnPay project change the OnPay title pulled from the gallery to some other text?

Use this CSS code under

article.Index-gallery-item:has(a[href="/onpay"]:hover) h2 {
    visibility: hidden;
}
article.Index-gallery-item:has(a[href="/onpay"]:hover) h2:before {
    content: "new OnPay";
    font-size: 20px;
    visibility: visible;
}

 

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.