-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
74 lines (57 loc) · 2.18 KB
/
example.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="circularProgressBar.css">
<title>Test</title>
<style>
html, body {
background-color: rgb(27, 27, 27);
display: flex;
align-items: center;
justify-content: center;
height: 100%;
position: relative;
margin: 0;
}
</style>
</head>
<body>
<div id="progress1" class="cpb-progress-container"></div>
<div id="progress5" class="cpb-progress-container"></div>
<div id="progress2" class="cpb-progress-container"></div>
<div id="progress3" class="cpb-progress-container"></div>
<script src="circularProgressBar.min.js"></script>
<script>
let yellowProgressBar = new CircularProgressBar(360, 360, 'progress1', {
strokeSize: 30,
backgroundColor: 'rgba(0,0,0,.7)',
strokeColor: 'gold',
centerIcon: 'img/done_icon_yellow.svg'
});
let orangeProgressBar = new CircularProgressBar(360, 360, 'progress2', {strokeSize: 60});
orangeProgressBar.setBackgroundColor('royalblue');
orangeProgressBar.setStrokeColor('navy');
orangeProgressBar.setCenterIcon('img/new_done_icon.svg');
let blueProgressBar = new CircularProgressBar(360, 360, 'progress3', {strokeSize: 60});
blueProgressBar.setBackgroundColor('darkcyan');
blueProgressBar.setStrokeColor('cyan');
blueProgressBar.showProgressNumber(true);
let cpb5 = new CircularProgressBar(360, 360, 'progress5', {
strokeSize: 30,
backgroundColor: 'firebrick',
strokeColor: 'gold',
showProgressNumber: true
});
let progress = 0;
setInterval(() => {
++progress;
yellowProgressBar.setProgress(progress);
orangeProgressBar.setProgress(progress);
blueProgressBar.setProgress(progress);
cpb5.setProgress(progress);
}, 100);
</script>
</body>
</html>