I would like to curve the hypotenuse side of this triangle div/background with CSS, so the result is something like this:
2 Answers
Another way of doing it, matching the background you are in with a pseudo :after covering the part you need :
Althogh I like more @Temani Afif answer above.
#curved-triangle::after {
content: "";
position: absolute;
top: -100px;
left: 0px;
background: #fff;
width: 200px;
height: 200px;
border-radius: 100%;
}
#curved-triangle {
width: 0;
height: 0;
border-left: 0px solid transparent;
border-right: 100px solid transparent;
border-bottom: 100px solid red;
position: relative;
}
<div id="curved-triangle"></div>
