Jump to content

How To Add A Hover Image For Custom Social Icon In Footer With CSS

Go to solution Solved by Beyondspace,

Recommended Posts

  • Solution
Posted (edited)
10 hours ago, ec25 said:

Hello,

Wondering how can I had another custom image (with CSS) when hovering over a certain custom imported social icon in the footer, I'm trying to make it match the rest of my social media icons, thank you!

Here's my website

https://www.erinncapko.com/

Try the following Custom Css code

.sqs-svg-icon--wrapper:after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: none;
}

.sections .sqs-svg-icon--wrapper:hover {
  background: none;
}

.sqs-svg-icon--wrapper:hover:after {
  opacity: 1;
}

.sqs-svg-icon--wrapper:hover .sqs-svg-icon--social {
  display: none;
}

/*instagram hover image url*/
.sqs-svg-icon--wrapper.instagram-unauth:after {
  background-image: url(https://plus.unsplash.com/premium_photo-1712935547661-4fe0b2de98bf?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8);
}

/*linkedin hover image url*/
.sqs-svg-icon--wrapper.linkedin-unauth:after {
  background-image: url(https://plus.unsplash.com/premium_photo-1712935547661-4fe0b2de98bf?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8);
}

/*redbubble hover image url*/
.sqs-svg-icon--wrapper[href*="redbubble"]:after {
  background-image: url(https://plus.unsplash.com/premium_photo-1712935547661-4fe0b2de98bf?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8);
}

Change image URL on your own

Edited by Beyondspace

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
3 hours ago, Beyondspace said:

Try the following Custom Css code

.sqs-svg-icon--wrapper:after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: none;
}

.sections .sqs-svg-icon--wrapper:hover {
  background: none;
}

.sqs-svg-icon--wrapper:hover:after {
  opacity: 1;
}

.sqs-svg-icon--wrapper:hover .sqs-svg-icon--social {
  display: none;
}

/*instagram hover image url*/
.sqs-svg-icon--wrapper.instagram-unauth:after {
  background-image: url(https://plus.unsplash.com/premium_photo-1712935547661-4fe0b2de98bf?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8);
}

/*linkedin hover image url*/
.sqs-svg-icon--wrapper.linkedin-unauth:after {
  background-image: url(https://plus.unsplash.com/premium_photo-1712935547661-4fe0b2de98bf?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8);
}

/*redbubble hover image url*/
.sqs-svg-icon--wrapper[href*="redbubble"]:after {
  background-image: url(https://plus.unsplash.com/premium_photo-1712935547661-4fe0b2de98bf?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8);
}

Change image URL on your own

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.