-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyles.scss
106 lines (100 loc) · 2.05 KB
/
styles.scss
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
99
100
101
102
103
104
105
106
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
background: black;
overflow: hidden;
position: relative;
height: 100vh;
}
#pacman{
width: 0;
height: 0;
position: relative;
top: calc(50% - 40px);
left: 0px;
// margin-left: 40px;
// animation: pacman_move 4.95s infinite linear;
&::before{
content: "";
width: 0;
height: 0;
position: absolute;
border-radius: 50%;
border-top: 40px solid transparent;
border-right: 40px solid transparent;
border-bottom: 40px solid yellow;
border-left: 40px solid yellow;
animation: main_down 1s infinite linear;
}
&::after{
content: "";
width: 0;
height: 0;
position: absolute;
border-radius: 50%;
border-top: 40px solid yellow;
border-right: 40px solid transparent;
border-bottom: 40px solid transparent;
border-left: 40px solid yellow;
animation: main_top 1s infinite linear;
}
}
.ghosts{
width: 400px;
height: 80px;
position: relative;
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
top: calc(50% - 40px);
left: -320px;
animation: ghost_move 5.8s infinite linear;
.ghost{
border-radius: 40px 40px 0 0;
width: 80px;
height: 80px;
}
.blinky{
background: #e62623;
margin-right: 40px;
}
.inky{
background: #00f7d8;
}
.pinky{
background: #f7b3d7;
}
.clyde{
background: #f7b146;
}
}
.background{
border: 3px solid blue;
width: 100vw;
height: 96px;
border-left: none;
border-right: none;
position: absolute;
top: calc(50% - 48px);
}
@keyframes main_top{
0%{transform: rotate(0deg)}
50%{transform: rotate(44deg)}
100%{transform: rotate(0deg)}
}
@keyframes main_down{
0%{transform: rotate(0deg)}
50%{transform: rotate(-44deg)}
100%{transform: rotate(0deg)}
}
// @keyframes pacman_move{
// 0%{ transform: translateX(-220px)}
// 100%{ transform: translateX(calc(100vw + 120px))}
// }
@keyframes ghost_move{
0%{ transform: translateX(-360px)}
100%{ transform: translateX(calc(100vw + 360px))}
}