Jump to content

Image Poster Color on Hover

Recommended Posts

Site URL: http://designsite.com

Hi - the following code is supposed to provided a color hover-over effect to Poster image cards. Unfortunately, it works for all image cards. Would anyone know how to update this code so it only applies to Poster image cards? Thanks in advance. Also, not that the URL does not have an example - Sqsp required one to write this post.

// Gradient Overlay on Poster Image //

.image-block-v2:before { 
content: "";
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
top: 0;
left: 0;  
opacity: 0; }

.image-block-v2:hover:before {
background: -webkit-linear-gradient(to top, #F07C63, #E45372);
background: linear-gradient(to top, #F07C63, #E45372);
opacity: .55;
transition: all .5s ease-in-out; 
}

Edited by mdemartin
Corrected the post
Link to comment
  • 2 months later...
11 hours ago, simkrys said:

I have the same question. I used an image poster to create a stylised text block to click through to different pages. Wondering how to create a hover effect on the posters.

https://www.wincservices.com/

Under "explore our services"

Hi, mdemartin Please follow this answer too

Add this to Design-.Custom CSS

.design-layout-poster.image-block-v2:before { 
content: "";
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
top: 0;
left: 0;  
opacity: 0; }

.design-layout-poster.image-block-v2:hover:before {
background: -webkit-linear-gradient(to top, #F07C63, #E45372);
background: linear-gradient(to top, #F07C63, #E45372);
opacity: .55;
transition: all .5s ease-in-out; 
}

image.thumb.png.a384dbe8cfaf54e1b943ddd749e414dd.png

Edited by bangank36

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 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
2 hours ago, simkrys said:

Hi @bangank36 thanks for the reply.

Now the issue is the image block is no longer clickable. The box originally links to a different page in the website.

I see, will update the code

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 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, simkrys said:

Hi @bangank36 thanks for the reply.

Now the issue is the image block is no longer clickable. The box originally links to a different page in the website.

updated

.design-layout-poster.image-block-v2 a:before { 
content: "";
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
top: 0;
left: 0;  
opacity: 0; }

.design-layout-poster.image-block-v2 a:hover:before {
background: -webkit-linear-gradient(to top, #F07C63, #E45372);
background: linear-gradient(to top, #F07C63, #E45372);
opacity: .55;
transition: all .5s ease-in-out; 
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 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

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.