Jump to content

3 images to change on hover

Recommended Posts

  • Replies 9
  • Views 451
  • Created
  • Last Reply
<img src="https://beaverhero.com/wp-content/uploads/2019/06/trees-3464777_640-min.jpg" width="200px" class="img1"/>
<div class="img2">
  <img src="https://beaverhero.com/wp-content/uploads/2019/08/momentum-squarespace.jpg"/>
  <img src="https://beaverhero.com/wp-content/uploads/2019/07/pedro-demo-squarespace-com-1689x1080-500w.jpg"/>
</div>
<style>
  /* hide 2 images */
  .img2 {
  	display: none;
  }
  /* show 2 images on image 1 hover */
  .img1:hover + .img2 {
  	display: block;
  }
</style>

Try add to Code Block

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

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.