Jump to content

change an image to another image once you hover on it

Recommended Posts

  • Replies 1
  • Views 154
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Add to Design > Custom CSS

/* Bynhistory image hover */
div#block-yui_3_17_2_1_1651746805098_3177 {
.slide:nth-child(1):hover img {
    content: url(https://cdn.pixabay.com/photo/2021/12/19/21/48/eurasian-pygmy-owl-6881984__480.jpg);
}
.slide:nth-child(2):hover img {
    content: url(https://cdn.pixabay.com/photo/2022/05/05/01/11/cormorant-7175037__340.jpg);
}
.slide:nth-child(3):hover img {
    content: url(https://cdn.pixabay.com/photo/2020/05/19/13/48/cartoon-5190942__340.jpg);
}
.slide:nth-child(4):hover img {
    content: url(https://cdn.pixabay.com/photo/2021/12/05/08/55/port-6847014__340.jpg);
}
.slide:nth-child(5):hover img {
    content: url(https://cdn.pixabay.com/photo/2022/05/03/20/12/prague-7172597__340.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

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.