-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
52 lines (47 loc) · 875 Bytes
/
style.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
*, *::before, *::after {
box-sizing: border-box;
}
:root {
--bgclr: #000;
--bgstart: rgba(100, 0, 0, 0.100);
--bgfinish: rgba(255, 0, 0, 255);
--duration: 3s;
}
body {
padding: 0;
margin: 0;
}
#progressbar {
position: relative;
width: 500px;
height: 3em;
background-color: var(--bgclr);
border-radius: 1.5em;
color: white;
font-family: Arial, Helvetica, sans-serif;
}
#progressbar::before {
content: attr(data-percent);
display: flex;
align-items: center;
position: absolute;
left: .5em;
top: .5em;
bottom: .5em;
width: calc(var(--width, 0) * 1%);
min-width: 2rem;
max-width: calc(100% - 1em);
border-radius: 1em;
padding: 1em;
animation-name: clr;
background-color: var(--bgfinish);
animation-duration: var(--duration);
}
@keyframes clr {
from {
background-color: var(--bgstart);
}
to {
background-color: var(--bgfinish);
}
}