JSFiddle - React, Tailwind, and code Playground

by kougiland

HTML

<div class="spinner"></div>
<div class="spinner yellow"></div>
<div class="spinner red">    5%</div>
<div class="spinner green"></div>
<div class="spinner rainbow"></div>

CSS

.spinner {
  width: 100px;
  height: 100px;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  overflow: hidden;
  position: relative;
  -webkit-box-shadow: 0px 2px 4px rgba(255,255,255,0.15);
  box-shadow: 0px 2px 4px rgba(255,255,255,0.15);
  color: #7af;
  line-height: 100px;
  text-align: center;
  z-index: 0;
  font-family: Tahoma, sans-serif;
  font-size: 25px;
  text-shadow: 2px 2px 2px #000;
  font-weight: bold;
  -webkit-text-stroke: 1px rgba(0,0,0,0.5);
  margin: 30px;
  display: inline-block;
/* The spinning color section */
/* The middle circle */
/* Different colors */
}
.spinner::before {
  content: "";
  width: 96px;
  height: 96px;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  background: -webkit-linear-gradient(#7af, #24334d 10%, #000 50%, #000 75%, #24334d);
  background: -moz-linear-gradient(#7af, #24334d 10%, #000 50%, #000 75%, #24334d);
  background: -o-linear-gradient(#7af, #24334d 10%, #000 50%, #000 75%, #24334d);
  background: -ms-linear-gradient(#7af, #24334d 10%, #000 50%, #000 75%, #24334d);
  background: linear-gradient(#7af, #24334d 10%, #000 50%, #000 75%, #24334d);
  position: absolute;
  top: 0;
  left: 0;
  border: 2px solid #000;
  -webkit-box-shadow: inset 0px 0px 3px #000, 0px 0px 0px rgba(0,0,0,0);
  box-shadow: inset 0px 0px 3px #000, 0px 0px 0px rgba(0,0,0,0);
  -webkit-animation: spin 2s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
  -moz-animation: spin 2s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
  -o-animation: spin 2s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
  -ms-animation: spin 2s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
  animation: spin 2s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
  z-index: -1;
}
.spinner::after {
  content: "";
  width: 80px;
  height: 80px;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  position: absolute;
  top: 8px;
  left: 8px;
  background: -webkit-linear-gradient(top, #3c3c3c, #101010);
  background: -moz-linear-gradient(top, #3c3c3c, #101010);
  background:...