-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
247 lines (209 loc) · 4.28 KB
/
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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
@keyframes leg_left {
0% {transform: scale(1.2);}
50% {transform: scale(1);}
100% {transform: scale(1.2);}
}
@keyframes leg_right {
0% {transform: scale(1);}
50% {transform: scale(1.2);}
100% {transform: scale(1);}
}
@keyframes robot {
0% {bottom: -50px; right: -150px; transform:scale(1); opacity: 100%}
50% {bottom: -100px; right: 0; transform:scale(1.1); }
100% {bottom: -50px; right: -150px; transform:scale(1); opacity: 100%}
}
html {
background: url(background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body {
height: 100vh;
width: 100vw;
box-sizing: border-box;
margin: 0;
padding: 0;
overflow: hidden;
}
.root {
display: flex;
flex-direction: column;
height: 100%;
}
h1 {
text-align: center;
font-family: fantasy;
font-family: 'Rye', sans-serif;
text-shadow: #FC0 1px 0 10px;
text-shadow: 1px 1px 2px black;
color: #f6d200
}
.content {
position: relative;
height: 100%;
}
.road {
position: absolute;
height: 140px;
width: 100%;
bottom: 0;
z-index: 1;
}
.android {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
bottom: -50px;
right: -150px;
}
.road:hover + .android {
animation-name: robot;
animation-duration: 15s;
animation-iteration-count: infinite;
}
.road:hover + .android .left_leg {
animation-name: leg_left;
animation-duration: 1s;
animation-iteration-count: infinite;
}
.road:hover + .android .right_leg {
animation-name: leg_right;
animation-duration: 1s;
animation-iteration-count: infinite;
}
.head,
.left_arm,
.torso,
.right_arm,
.left_leg,
.right_leg {
background: linear-gradient(90deg, #ffd400 0%, #ffca20 25%, #ffe782 50%, #ffca20 75%, #ffd400 100%);
/* background: linear-gradient(90deg, #31033c 0%, #57235c 25%, #9432ab 50%, #57235c 75%, #31033c 100%); */
/* background: linear-gradient(90deg, #000000 0%, #3a3838 25%, #2d2d2d 50%, #0f0f0f 75%, #000000 100%); */
/* background: linear-gradient(90deg, #844414 0%, #cf7d52 25%, #f7c16b 50%, #cf7d52 75%, #844414 100%); */
border: 2px solid #ffca20;
box-shadow: 1px 1px 6px rgba(72, 70, 70, 0.4);
}
.head {
width: 200px;
margin: 0 auto;
height: 150px;
border-radius: 200px 200px 0 0;
margin-bottom: 10px;
position: relative;
}
.smile {
width: 20px;
height: 16px;
border-bottom: 5px solid black;
position: absolute;
bottom: 7px;
left: 50%;
}
.eyes {
display: flex;
}
.head:hover .pupil {
margin-left: auto;
width: 6px;
height: 6px;
transition: all 1s ease-in-out;
}
.head:hover .smile {
width: 70px;
border-radius: 38%;
transition: all 1s ease-in-out;
}
.upper_body {
height: 150px;
display: flex;
position: relative;
z-index: 1;
}
.torso:hover ~ .left_arm {
-webkit-transform: rotate(60deg);
-moz-transform: rotate(60deg);
-o-transform: rotate(60deg);
-ms-transform: rotate(60deg);
transform: rotate(60deg);
bottom: 130px;
left: 50px;
transform: rotate(240deg);
}
.torso:hover ~ .right_arm {
-webkit-transform: rotate(60deg);
-moz-transform: rotate(60deg);
-o-transform: rotate(60deg);
-ms-transform: rotate(60deg);
transform: rotate(240deg);
right: -80px;
bottom: 130px;
}
.left_arm, .right_arm {
width: 40px;
height: 125px;
border-radius: 100px;
box-sizing: border-box;
position: absolute;
}
.left_arm {
left: -50px;
}
.right_arm {
margin-left: 10px;
right: -50px;
}
.torso {
width: 200px;
height: 200px;
border-radius: 0 0 50px 50px;
}
.lower_body {
display: flex;
width: 200px;
/* This is another useful property. Hmm what do you think it does?*/
margin: 0 auto;
}
.left_leg, .right_leg {
width: 40px;
height: 120px;
border-radius: 0 0 100px 100px;
}
.left_leg {
margin-left: 45px;
}
.right_leg {
margin-left: 30px;
}
.left_eye, .right_eye {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 15px;
background-color: #8fc184;
border: 2px solid black;
}
.pupil {
width: 12px;
height: 12px;
background-color: black;
border-radius: 50%;
}
.left_eye {
/* These properties are new and you haven't encountered
in this course. Check out CSS Tricks to see what it does! */
position: relative;
top: 100px;
left: 40px;
}
.right_eye {
position: relative;
top: 100px;
left: 120px;
}