Clip Path - Slanted Edges

</ head>

<!-- SNIPPET NAME HERE -->
<style>
  /* clip elements to specific shapes */
  /* provide 4 values for each side in the order: top, right, bottom, left to create the polygon */
  /* the calc() property is used to make calculations based on viewport  */
  .cp-1{
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10vw), 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10vw), 0 100%); /* webkit browsers */
  }

  .cp-2{
    clip-path: polygon(0 calc(0% + 10vw), 100% 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 calc(0% + 10vw), 100% 0, 100% 100%, 0 100%); /* webkit browsers */
  }

  .cp-3{
    clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%,0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%,0 90%); /* webkit browsers */
  }

  .cp-4{
    clip-path: polygon(0 0, 100% 0, 100% 90%, 25% 80%, 50% 100%, 5% 80%, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 90%, 75% 80%, 50% 100%, 25% 80%, 0 90%); /* webkit browsers */
  }

  .cp-btn {
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    -webkit-clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%); /* webkit browsers */
  }

  .cp-btn:hover {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 90%);
    -webkit-clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%); /* webkit browsers */
  }
</style>

</ body>

HTML/Embed

<!-- SNIPPET NAME HERE -->
<style>
  /* clip elements to specific shapes */
  /* provide 4 values for each side in the order: top, right, bottom, left to create the polygon */
  /* the calc() property is used to make calculations based on viewport  */
  .cp-1{
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10vw), 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10vw), 0 100%); /* webkit browsers */
  }

  .cp-2{
    clip-path: polygon(0 calc(0% + 10vw), 100% 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 calc(0% + 10vw), 100% 0, 100% 100%, 0 100%); /* webkit browsers */
  }

  .cp-3{
    clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%,0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%,0 90%); /* webkit browsers */
  }

  .cp-4{
    clip-path: polygon(0 0, 100% 0, 100% 90%, 25% 80%, 50% 100%, 5% 80%, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 90%, 75% 80%, 50% 100%, 25% 80%, 0 90%); /* webkit browsers */
  }

  .cp-btn {
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    -webkit-clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%); /* webkit browsers */
  }

  .cp-btn:hover {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 90%);
    -webkit-clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%); /* webkit browsers */
  }
</style>
Only tabs with a " " have code.
Only tabs with a " " have code.
Only tabs with a " " have code.
Only tabs with a " " have code.
If you have already pasted this code into your project then you can skip this. If you haven't, and it's your first time using CodeCrumbs, then copy this code and navigate to your sites global settings > Custom Code tab > paste it into the <head> (first custom code block). It just needs to exist once.
Author
N/A
Updated on
May 8, 2024

How to use:

Unlock more with PRO

Want to learn how to use this Crumb? Unlock detailed documentation, video tutorials, comments & support!

Upgrade to Pro

Unlock more with PRO

Want to learn how to use this Crumb? Unlock detailed documentation, video tutorials, comments & support!

Upgrade to Pro
Correction: I'm sorry I kept saying "web-clip" when I meant to say "clip-path." Carry on 😉
Tutorial Coming Soon!

Check Browser Support

Interactive Table

Shape the edge of your sections, buttons or other elements to give them more character with some CSS using the clip-path property.

Clone Project
Documentation
Author:
Status:
Deprecated
New
Updated
Latest Version:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor