<div class='my-circle'></div>
<div class='my-half-circle'></div>
.my-circle {
position: relative;
height: 10rem;
width: 10rem;
background: linear-gradient(to right, #fff, #000);
border-radius: 50%;
}
.my-circle::after {
content: '';
display: block;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
height: calc(100% - 2px);
width: calc(100% - 2px);
border-radius: 50%;
background: #fff;
}
.my-half-circle {
position: relative;
height: 10rem;
width: 10rem;
background: linear-gradient(140deg, #fff, #000);
border-radius: 50%;
}
.my-half-circle::after {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 50%;
background: #fff;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.