Jump to content

Change blog post image on hover

Go to solution Solved by tuanphan,

Recommended Posts

Hi everyone! I'm trying to create an effect where when the user hovers over a Blog post, the image changes.

Here's the site and particular page I'm working on: https://physiomotionhk.squarespace.com/practitioners (password: demo - all small letters)

It's coming from the original site here, where when the user hovers over the Practitioner image, it displays a second image:

https://physiomotion.com.hk/team/

Thanks in advanced for all your help!

Edited by josieng
Link to comment
  • 2 weeks later...
  • Solution
On 9/10/2023 at 10:20 AM, Rubato said:

Hi, I also have this question for my own site. Hope someone helps soon!

I see the site used this code. If you share link to your site, we can help easier

.image-wrapper[href*="/panda-li"]:hover img {
    content: url(https://images.squarespace-cdn.com/content/6477640f1f0d1676f9611d5d/2cd6d765-d89f-45b3-a9ff-b6f1cdc6ccc5/PhysioMotion_Hong_Kong_Physiotherapy_Panda_Li_Running_Personal.png?content-type=image%2Fpng)
}

.image-wrapper[href*="/angus-yuen"]:hover img {
    content: url(https://images.squarespace-cdn.com/content/6477640f1f0d1676f9611d5d/27a1a28c-7c7b-4022-a42e-7e54ef8ab7ca/PhysioMotion_Hong_Kong_Physiotherapy_Angus_Hiking_Personal.jpg?content-type=image%2Fjpeg)
}

.image-wrapper[href*="/rita-kwong"]:hover img {
    content: url(https://images.squarespace-cdn.com/content/6477640f1f0d1676f9611d5d/99e29d0f-1533-4414-8ba4-981759322b71/PhysioMotion_Hong_Kong_Physiotherapy_Rita_Pilates_Personal.jpg?content-type=image%2Fjpeg)
}

 

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.