How can I draw this Belle icon shape in CSS only?
I\'ve tried the bor
Well, in order to achieve the exact effect, we cannot rely on a single element even if we use percentage on border-radius
.
So one option could be using two (pseudo-)elements overlapping each other where one of them is rotated by 90deg
:
div {
width: 300px;
height: 300px;
/* Just for demo */
width: 95vmin; height: 95vmin;
position: relative;
}
div:after, div:before {
content: "";
background: teal;
position: absolute;
top: 0;
left: 8%;
right: 8%;
bottom: 0;
border-radius: 50% / 22%;
}
div:before {
transform: rotate(-90deg); /* vendor prefixes omitted due to brevity */
}