Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS special shape with one shaved corner [duplicate]

Tags:

css

shapes

I try to make a button with one corner shaved, I was searching around the web but could't find a method to create it like that.

enter image description here

The thing I tried is the following css code:

   #button {
  border-bottom: 100px solid red;
  border-left: 25px solid transparent;
  height: 0;
  width: 100px;
}

But as you can see, it does..:

enter image description here

Any help would be great

like image 844
Hessel Avatar asked Feb 25 '26 03:02

Hessel


1 Answers

Have you consider using clip-path? You can try this

.path {
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%, 0 29%);
  width: 100px;
  height: 60px;
  background-color: tomato;
}
<div class="path"></div>
like image 181
louie kim Avatar answered Feb 27 '26 02:02

louie kim