As stated on CSS-Tricks, a CSS triangle can be written as:
#triangle {
width: 0;
height: 0;
border-bottom: 100px solid red;
border-left: 100px solid transparent;
}
<div id="triangle"></div>
Curving the border via CSS however, doesn't seem to work:
#triangle {
width: 0;
height: 0;
border-bottom: 100px solid red;
border-left: 100px solid transparent;
border-bottom-right-radius: 10px;
}
<div id="triangle"></div>
It creates glitches on FF, and shows the whole triangle as red on Chrome. Safari seems the only one to show what I would expect.
Question 1. Is this a browser bug or am I doing something wrong?
Question 2. Any other way to easily implement a bottom-right triangle with a bottom-right border-radius? I'm thinking SVG, but then the curvature poignancy will be kind of difficult to modify from code.
Thanks.