<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Radial Progress Indicator</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<h1>Single element Radial Progress Indicator</h1>
<h2>Normal</h2>
<div class="big">
<div class="pie pie--value" style="--percent:35;"></div>
<div class="pie pie--value" style="--percent:15;"></div>
<div class="pie pie--value" style="--percent:65;"></div>
<div class="pie pie--value" style="--percent:85;"></div>
<div class="pie" style="--percent:40;"></div>
</div>
<div class="med">
<div class="pie pie--value" style="--percent:35;"></div>
<div class="pie pie--value" style="--percent:15;"></div>
<div class="pie pie--value" style="--percent:65;"></div>
<div class="pie pie--value" style="--percent:85;"></div>
<div class="pie" style="--percent:40;"></div>
</div>
<div class="sml">
<div class="pie pie--value" style="--percent:35;"></div>
<div class="pie pie--value" style="--percent:15;"></div>
<div class="pie pie--value" style="--percent:65;"></div>
<div class="pie pie--value" style="--percent:85;"></div>
<div class="pie" style="--percent:40;"></div>
</div>
<h2>Disc variant</h2>
<div class="big">
<div class="pie pie--value pie--disc" style="--percent:35;"></div>
<div class="pie pie--value pie--disc" style="--percent:15;"></div>
<div class="pie pie--value pie--disc" style="--percent:65;"></div>
<div class="pie pie--value pie--disc" style="--percent:85;"></div>
<div class="pie pie--disc" style="--percent:40;"></div>
</div>
<div class="med">
<div class="pie pie--value pie--disc" style="--percent:35;"></div>
<div class="pie pie--value pie--disc" style="--percent:15;"></div>
<div class="pie pie--value pie--disc" style="--percent:65;"></div>
<div class="pie pie--value pie--disc" style="--percent:85;"></div>
<div class="pie pie--disc" style="--percent:40;"></div>
</div>
<div class="sml">
<div class="pie pie--value pie--disc" style="--percent:35;"></div>
<div class="pie pie--value pie--disc" style="--percent:15;"></div>
<div class="pie pie--value pie--disc" style="--percent:65;"></div>
<div class="pie pie--value pie--disc" style="--percent:85;"></div>
<div class="pie pie--disc" style="--percent:40;"></div>
</div>
<h2>Dynamically updated (CSS custom property)</h2>
<div class="big">
<div class="js pie pie--value"></div>
<div class="js pie pie--value pie--disc"></div>
<div class="js pie"></div>
<div class="js pie pie--disc"></div>
</div>
<div class="med">
<div class="js pie pie--value"></div>
<div class="js pie pie--value pie--disc"></div>
<div class="js pie"></div>
<div class="js pie pie--disc"></div>
</div>
<div class="sml">
<div class="js pie pie--value"></div>
<div class="js pie pie--value pie--disc"></div>
<div class="js pie"></div>
<div class="js pie pie--disc"></div>
</div>
</body>
</html>
.pie {position: relative;display: inline-block;background-image: conic-gradient(rgba(0,0,0,0) calc(3.6deg * var(--percent)),rgba(0,0,0,1) calc(3.6deg * var(--percent)));background-blend-mode: overlay;background-position: 50% 50%;background-size: 150%;width: 3.75em;height: 3.75em;border-radius: 50%;}
/* show the percentage (thanks to Ana Tudor for the counter() trick) */
.pie--value::after {position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);counter-reset: percent var(--percent);content: counter(percent) "%";color: #fff;text-shadow: 1px 1px 1px #000;}
.pie--disc::before {content: '';position: absolute;top: .5em;left: .5em;right: .5em;bottom: .5em;border-radius: 50%;background: #fff;}
.pie--disc::after {color: #000;text-shadow: none;}
/* demo styles
----------------------------------------------------- */
body::before {color: red;font-size: 150%;background-color: #f1f1f2;content: "This browser doesn't support conical graidents yet";}
@supports (background: conic-gradient(red, blue)) {body::before {content: '';}}
body {font: 90%/1.5 Arial;background: #f1f1f2;text-align: center;}
.pie {border: .15em solid #fff;box-shadow: 0 .075em .2em .05em rgba(0,0,0,.25);margin: .75rem;}
.pie:nth-child(1) {background-color: #d44;}
.pie:nth-child(2) {background-color: #fc3;}
.pie:nth-child(3) {background-color: #ac0;}
.pie:nth-child(4) {background-color: #0ac;}
.pie:nth-child(5) {background-color: #d6b;}
.big {font-size: 200%;}
.med {font-size: 150%;}
.sml {font-size: 100%;}
function loop(t) {
requestAnimationFrame(loop);
updateCharts(Math.floor(t / 16) % 100);
}
function updateCharts(value) {
charts.forEach(chart => setChartValue(chart, value));
}
function setChartValue(chart, value) {
chart.style.setProperty('--percent', value);
}
let charts = document.querySelectorAll('.js');
loop();