Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create straight corners with CSS border-radius? [duplicate]

Tags:

css

I am trying to create this kind of straight corner with the CSS border-radius property:

enter image description here

But so far I am only getting the basic CSS rounded corners. Does anyone have a solution for this? I am trying not to use an image to create the effect.

Thanks in advance.

like image 509
Arjenovic Avatar asked Oct 28 '25 09:10

Arjenovic


1 Answers

Well, border-radius will always create a rounded edge (or have you ever seen a polygon with a radius?). I would create a scalable SVG image with the border (and transparency in the middle, in order to let you switch the background color in your CSS) and use it as the background of the box.

like image 80
Sebastian Avatar answered Oct 31 '25 02:10

Sebastian



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!