-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle3.css
98 lines (85 loc) · 1.86 KB
/
style3.css
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
body {
//border: 2px solid;
}
.centered {
width: 50%;
background-color: #FFFFFF;
display: flex;
justify-content: space-around;
}
.myLabel {
text-align:left;
//align-items: start;
padding: 5px;
}
.centeredButtons {
width: 50%;
background-color: #FFFFFF;
display: flex;
justify-content: space-around;
}
.centeredButtons button {
width: 50%;
margin: 5px; /* or whatever you like */
}
#box1 {
border: 5px solid;
width: 250px;
height: 250px;
font-size: 22px;
background: greenyellow;
margin-left: 20px;
margin-top: 20px;
margin-bottom: 20px;
margin-right: 20px;
}
#box2 {
border: 5px solid;
width: 250px;
height: 250px;
font-size: 22px;
background: dodgerblue;
}
.red {
color: rgb(255, 47, 47);
}
.circular-progress {
--size: 250px;
--half-size: calc(var(--size) / 2);
--stroke-width: 20px;
--radius: calc((var(--size) - var(--stroke-width)) / 2);
--circumference: calc(var(--radius) * pi * 2);
--dash: calc((var(--progress) * var(--circumference)) / 100);
animation: progress-animation 5s linear 0s 5 forwards;
}
.circular-progress circle {
cx: var(--half-size);
cy: var(--half-size);
r: var(--radius);
stroke-width: var(--stroke-width);
fill: none;
stroke-linecap: butt;
}
.circular-progress circle.bg {
stroke: #ddd;
}
.circular-progress circle.fg {
transform: rotate(-90deg);
transform-origin: var(--half-size) var(--half-size);
stroke-dasharray: var(--dash) calc(var(--circumference) - var(--dash));
transition: stroke-dasharray 0s linear 0s;
stroke: #5394fd;
}
@property --progress {
syntax: "<number>";
inherits: false;
initial-value: 0;
}
@keyframes progress-animation {
from {
--progress: 0;
}
to {
--progress: 100;
}
}