I would like to cut a hole into this element where the skyblue
is so I can see the background. I cannot seem to figure out how to do this. I have seen it done but I cannot duplicate it using a conic-gradient.
This is what I have gotten so far. I have tried to make the skyblue
transparent
, but that just showed the conic-gradient.
.container { width: 200px; }
.spinner {
height: 0px;
width: 100%;
padding-bottom: calc(100% - 20px);
margin: 0;
background: radial-gradient(circle at center, skyblue 54%, transparent 54.8%),
conic-gradient(from 0deg at center, transparent 45deg, orange 360deg);
clip-path: circle(46% at center);
}
<div class="container">
<div class="spinner"></div>
</div>
I also tried using an :after
pseudo selector, but that didn't work:
.spinner:after {
content: '';
background: green;
clip-path: circle(50px at center);
width: 168px;
height: 168px;
}