I am trying to create a half arch around a full circle like below. How would I create this in css? So far I have only created the circle but no idea how to do the arch.

.circle {
width: 45px;
height: 45px;
border-radius: 50%;
font-size: 20px;
color: #fff;
line-height: 45px;
text-align: center;
position: relative;
background: #BDBDBD;
}
<div class="circle">1</div>
You can use :after pseudo-element to create half circle. You also need to use bottom-right and top-right border-radius.
.circle {
width: 100px;
height: 100px;
margin: 50px;
position: relative;
line-height: 100px;
text-align: center;
border-radius: 50%;
background: #BDBDBD;
color: white;
}
.circle:after {
content: '';
position: absolute;
top: 0;
right: 0;
border: 10px solid gray;
border-left: 0;
border-bottom-right-radius: 100px;
border-top-right-radius: 100px;
width: 55px;
height: calc(100% + 10px);
transform: translate(15px, -15px);
}
<div class="circle">1</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With