JSFiddle - React, Tailwind, and code Playground
by reeson46
HTML
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div class="row d-flex justify-content-center mt-100">
<div class="col-md-6">
<div class="progress blue"> <span class="progress-left"> <span class="progress-bar"></span> </span> <span class="progress-right"> <span class="progress-bar"></span> </span>
<div class="progress-value">90%</div>
</div>
</div>
</div>
CSS
body {
background-color: #7E57C2
}
.mt-100 {
margin-top: 200px
}
.progress {
width: 150px;
height: 150px !important;
float: left;
line-height: 150px;
background: none;
margin: 20px;
box-shadow: none;
position: relative
}
.progress:after {
content: "";
width: 100%;
height: 100%;
border-radius: 50%;
border: 12px solid #fff;
position: absolute;
top: 0;
left: 0
}
.progress>span {
width: 50%;
height: 100%;
overflow: hidden;
position: absolute;
top: 0;
z-index: 1
}
.progress .progress-left {
left: 0
}
.progress .progress-bar {
width: 100%;
height: 100%;
background: none;
border-width: 12px;
border-style: solid;
position: absolute;
top: 0
}
.progress .progress-left .progress-bar {
left: 100%;
border-top-right-radius: 80px;
border-bottom-right-radius: 80px;
border-left: 0;
-webkit-transform-origin: center left;
transform-origin: center left
}
.progress .progress-right {
right: 0
}
.progress .progress-right .progress-bar {
left: -100%;
border-top-left-radius: 80px;
border-bottom-left-radius: 80px;
border-right: 0;
-webkit-transform-origin: center right;
transform-origin: center right;
animation: loading-1 1.5s linear forwards 1.5s;
}
.progress .progress-value {
width: 90%;
height: 90%;
border-radius: 50%;
background: #000;
font-size: 24px;
color: #fff;
line-height: 135px;
text-align: center;
position: absolute;
top: 5%;
left: 5%
}
.progress.blue .progress-bar {
border-color: #049dff
}
.progress.blue .progress-left .progress-bar {
animation: loading-2 1.5s linear forwards 1.5s;
}
.progress.yellow .progress-bar {
border-color: #fdba04
}
.progress.yellow .progress-right .progress-bar {
animation: loading-3 1.5s linear forwards 1.5s;
}
.progress.yellow .progress-left .progress-bar {
animation: none;
}
@keyframes...