<label style="--p:10"> label <progress max="100" value="10">10%</progress></label>
<label style="--p:40;--c: #3ddb50"> label <progress max="100" value="40">40%</progress></label>
<label style="--p:80;--c: #db3d3d"> label <progress max="100" value="80">80%</progress></label>
<label style="--p:100;--c: #4c3a6a"> label <progress max="100" value="100">100%</progress></label>
progress[value] {
--background:
radial-gradient(50% 50%,var(--c) 98%,#0000) top/10% 10% no-repeat,
conic-gradient(var(--c) calc(var(--p)*1%),#0000 0);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
position: absolute;
inset: 0;
height: 100%;
width: 100%;
border-radius: 50%;
overflow: hidden;
background: var(--background);
-webkit-mask: radial-gradient(50% 50%,#0000 79%,#000 80% 100%,#0000 102%)
}
progress[value]::-webkit-progress-bar {
background: var(--background);
}
progress[value]::-webkit-progress-value {
background: #0000;
}
progress[value]::-moz-progress-bar {
background: #0000;
}
label {
--w: 160px; /* the width*/
--c: #31c6f7; /* the color */
font-size: 20px;
font-weight: bold;
display: inline-grid;
place-content: center;
width: var(--w);
aspect-ratio: 1;
position: relative;
}
label::before {
content: "";
position: absolute;
border-radius: 50%;
inset: 45%;
background: var(--c);
transform: rotate(calc(var(--p)*3.6deg)) translateY(calc(50% - var(--w)/2));
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.