How to create a circle background and crop it in div?
2 Answers
a simple clip-path can do it:
.box {
width:300px;
height:150px;
background:lightblue;
clip-path:circle(farthest-side);
}
<div class="box"></div>
Or a radial-gradient
.box {
width:300px;
height:150px;
background:radial-gradient(circle farthest-side,lightblue 98%,#0000);
}
<div class="box"></div>
