Jump to content

Can't get custom code to apply

Go to solution Solved by Ziggy,

Recommended Posts

Trying to add a custom clipping path to an image. It works fine in the design mode, but as soon as I apply it reverts. 

I'm thinking I'm maybe applying the css to the wrong ID? I want to do 3 different custom clip paths on 3 different images so want to apply it to a specific image, as opposed to an entire section.

Thanks!

 

Code:

#yui_3_17_2_1_1674761161873_327{
clip-path: polygon(100% 0%, 75% 50%, 100% 100%, 25% 100%, 0% 50%, 25% 0%);
transition: all .5s;
}

#yui_3_17_2_1_1674761161873_327:hover{
clip-path: polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%);
}

Link to comment
  • Solution

You are using the wrong identifier, this type is dynamic and changes each time you load the page:

#yui_3_17_2_1_1674761161873_327

You need a block ID, check out this guide on finding block IDs:

https://squarefortytwo.com/squarespace-guides/find-an-id-in-squarespace-71

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.