JSFiddle - React, Tailwind, and code Playground

by Kirubel Girma

HTML

<div class="circon">
<div class="cir1"></div>
<div class="cir2"></div>
</div>

CSS

.circon {
  height: 10em;
  width: 10em;
  
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  margin: auto;
}

.cir1 {
  height: 100%;
  width: 100%;
  border-radius: 20em;
  background: cornflowerblue;
  
  position: absolute;
}

.cir2 {
    left: 0;
    right: -15em;
    bottom: 0;
    top: 0;
    margin: auto;
    height: 2em;
    width: 2em;
    border-radius: 20em;
    background: #8BC34A;
    position: absolute;
}

JavaScript

var X = r * cosine(angle)
     var doughnut = 0;
     window.setInterval(
     function () {
         doughnut = doughnut + 1;
         document.getElementById("circon").innerHTML = "You have " + doughnut + " doughnuts!";

     }, 1000);