-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
87 lines (79 loc) · 1.74 KB
/
styles.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
:root {
--radius: 50px; /* radius / 2 */
--speed: 0.7s;
}
.frame {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: 400px;
margin-top: -200px;
margin-left: -200px;
border-radius: 2px;
box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
background: #2C2E2E;
overflow: hidden;
}
.pacman {
position: absolute;
width: calc(var(--radius) * 2);
height: calc(var(--radius) * 2);
top: calc((400px - var(--radius) * 2) / 2);
left: calc((400px - var(--radius) * 2) / 2);
fill: none;
stroke: #F4D146;
stroke-width: var(--radius);
stroke-linecap: butt;
stroke-dasharray: calc(var(--radius) * 3.14);
animation: mouth var(--speed) ease-in-out infinite;
}
.eye {
position: absolute;
width: 12px;
height: 12px;
top: 167px;
left: 204px;
fill: #2C2E2E;
animation: eye var(--speed) ease-in-out infinite;
}
.dots {
position: absolute;
height: 14px;
width: 240px;
top: 193px;
left: 180px;
stroke: #F4D146;
stroke-width: 14px;
stroke-dasharray: 0px 50px;
stroke-linecap: round;
animation: points var(--speed) linear infinite;
stroke-dashoffset: 14;
}
@keyframes mouth {
0%, 100% {
stroke-dashoffset: 0;
transform: rotate(0deg) translate3d(0, 0, 0);
}
50% {
stroke-dashoffset: calc(var(--radius) * 3.14 / 4);
transform: rotate(45deg);
}
}
@keyframes eye {
0%, 100% {
transform: translate3d(0, 0, 0);
}
50% {
transform: translate3d(-6px, -3px, 0);
}
}
@keyframes points {
0% {
stroke-dashoffset: 14;
transform: translate3d(0, 0, 0);
}
100% {
stroke-dashoffset: 64;
}
}