-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress_circle_bar.html
More file actions
43 lines (38 loc) · 881 Bytes
/
progress_circle_bar.html
File metadata and controls
43 lines (38 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<div class="circle-progress">
<svg>
<circle cx="50" cy="50" r="40"></circle>
<circle cx="50" cy="50" r="40" class="progress"></circle>
</svg>
<span>75%</span>
</div>
<style>
.circle-progress {
width: 100px;
height: 100px;
position: relative;
}
svg {
width: 100px;
height: 100px;
transform: rotate(-90deg);
}
circle {
fill: none;
stroke-width: 8;
stroke: #ddd;
}
.progress {
stroke: #4caf50;
stroke-dasharray: 251;
stroke-dashoffset: calc(251 - (251 * 75) / 100);
transition: stroke-dashoffset 1s ease-in-out;
}
.circle-progress span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 16px;
font-weight: bold;
}
</style>