-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathstyle.css
44 lines (40 loc) · 795 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
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(to bottom, teal, aqua);
}
.battery {
width: 6em;
height: 3em;
font-size: 30px;
color: midnightblue;
border: 0.5em solid currentColor;
border-radius: 0.2em;
position: relative;
background-image: linear-gradient(to right, whitesmoke, whitesmoke);
background-repeat: no-repeat;
background-size: 30% 80%;
background-position: 0.3em 0.3em;
animation: charge 5s steps(8) infinite;
}
.battery::after {
content: '';
position: absolute;
width: 0.5em;
height: 2em;
background-color: currentColor;
top: 0.5em;
right: -1em;
border-radius: 0 0.2em 0.2em 0;
}
@keyframes charge {
from {
background-size: 10% 80%;
}
to {
background-size: 95% 80%;
}
}