0

enter image description here

As seen in the picture, the background colour is magenta and the button is white. Right bottom corner of the button is not either rectangular or rounded but kind of slash off.

Can I achieve this using CSS?

Sameera Thilakasiri
  • 9,452
  • 10
  • 51
  • 86

1 Answers1

1

Here is the example with new property clip-path.

You can do experiments on https://bennettfeely.com/clippy/ site

div {
  width: 100px;
  min-height: 50px;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%);
  background: lightblue;
}
<div class="btn">
    button
</div>
Nisharg Shah
  • 16,638
  • 10
  • 62
  • 73