You could use ::before
and :after
pseudo element as shown in my snippet. I added both, but for your requirements one would probably suffice:
(Edit: I changed the position parameters, centering the pseudo elements. That way you only need to change height
and width
if you want different dimensions)
* {
box-sizing: border-box;
}
body {
margin: 0;
background: #7a4;
}
div.circle {
background: rgba(255, 255, 255, 0.5);
height: 400px;
width: 400px;
border-radius: 50%;
margin: auto;
margin-top: 100px;
position: relative;
}
.circle::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 440px;
width: 440px;
border-radius: 50%;
border: 20px solid;
border-color: rgba(255, 255, 255, 0.5);
}
.circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 520px;
width: 520px;
border-radius: 50%;
border: 20px solid;
border-color: rgba(255, 255, 255, 0.5);
}
<div class="circle"></div>