Jump to content

Hover on video gallery block goes to alternate image

Go to solution Solved by tuanphan,

Recommended Posts

You can add this to Design > Custom (this code for adidas item), if it works, we will send code for other

div#block-yui_3_17_2_1_1688340999924_3167 .slide:nth-child(1):hover img {
    content: url(https://images.squarespace-cdn.com/content/v1/5e57ff34dff2820a6f1b09bc/1642637298043-7E00F5DJEOOW188O56MG/johnniewalker-short.gif?format=500w);
}

 

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
  • Solution
On 7/12/2023 at 6:36 AM, MisterCampos said:

Oh my gosh, this totally worked! I'm embarrassed I couldn't figure this out.

For the rest of them, do I just change the number of the "nth-child(1)" in relation to the slide?

Also, is it possible to add a slightly slower transition, maybe through "ease-in-out"?

Yes, just repeat the code & change to 2, 3, 4...

Slower, I guess not possible, but you try this code

div#block-yui_3_17_2_1_1688340999924_3167 .slide:hover img, div#block-yui_3_17_2_1_1688340999924_3167 img {
   transition: all ease-in-out 0.3s !important;
}

 

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
  • 5 weeks later...
On 7/11/2023 at 3:56 PM, tuanphan said:

You can add this to Design > Custom (this code for adidas item), if it works, we will send code for other

div#block-yui_3_17_2_1_1688340999924_3167 .slide:nth-child(1):hover img {
    content: url(https://images.squarespace-cdn.com/content/v1/5e57ff34dff2820a6f1b09bc/1642637298043-7E00F5DJEOOW188O56MG/johnniewalker-short.gif?format=500w);
}

 

that code will work when I hover my mouse in the video it will play? @tuanphan

Link to comment
On 8/14/2023 at 12:28 PM, xtianisabsent said:

that code will work when I hover my mouse in the video it will play? @tuanphan

Hi,

This code will replace current image with new image on hover, not make video autoplay

If you need video autoplay, please share link to page where you use video, we can check easier

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.