Jump to content

Display second image on hover

Recommended Posts

I used the following CSS code to display a second image on hover. I have three interrelated questions:

1. How do I get the transition to be less abrupt? More of a fade in and out?

2. How do I get a banner with the caption to appear like I would with the native "caption overlay on hover?"

3. How do I get the image to fade into view when scrolled past / fade out when the user scrolls beyond it?

Thanks to any help that can be provided. 

Link to comment
  • Replies 5
  • Views 222
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1 hour ago, Cryptcocrew said:

Sorry, realized I forgot to insert the code:

 

<img src="First Image" onmouseover="this.src='Second Image'" onmouseout="this.src='First Image'">

 

You can consider using this guide with Image Block. I faced a same question yesterday.

 

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.