Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn button into parallelogram?

Tags:

html

css

I want to create buttons as seen in the following picture. But I don't have any idea, on how to reach this. So the buttons shouldn't simply be rotated, but the horizontal edges shall remain horizontal. Can someone give me a hint or a keyword for this issue?

enter image description here

Thanks!

like image 678
OttherCreek Avatar asked Jan 29 '26 08:01

OttherCreek


1 Answers

The easiest way to create that sort of thing in the modern web is to use a clip path. Something like:

clip-path: polygon(0 10%, 100% 0%, 100% 90%, 0% 100%);

Pair that with a transform: rotate on the text and voila.

It looks like your screenshot comes from a website. You can use the dev tools to inspect the buttons to see how they did it.

like image 51
Zach Saucier Avatar answered Jan 31 '26 22:01

Zach Saucier



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!