-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday9.html
More file actions
142 lines (118 loc) · 2.51 KB
/
day9.html
File metadata and controls
142 lines (118 loc) · 2.51 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DAY 9 | CSS CHALLENGE</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
main {
display: grid;
place-items: center;
min-height: 100vh;
}
.frame {
position: relative;
width: 400px;
height: 350px;
border-radius: 1.5rem;
box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
background: #f6e8d7;
background: radial-gradient(ellipse at center, #f6e8d7 0%, #dabe9b 100%);
overflow: hidden;
}
.floor {
position: absolute;
top: 245px;
left: 0;
right: 0;
bottom: 0;
background: #232323;
}
.invisible-men {
animation: fade-in 0.8s ease-out 1s;
animation-fill-mode: both;
}
.leg {
position: absolute;
top: 0px;
left: 147px;
width: 150px;
height: 245px;
transform-origin: 50% 0;
}
.shoe {
position: absolute;
width: 150px;
height: 128px;
left: 0;
bottom: 0;
background: url("img/boots.svg") center center no-repeat;
transform-origin: 0 95%;
}
.left {
animation: leg-swing 2s ease-in-out infinite;
}
.left .shoe {
animation: shoe-turn 2s ease-in-out infinite;
}
.right {
animation: leg-swing 2s ease-in-out 1s infinite;
}
.right .shoe {
animation: shoe-turn 2s ease-in-out 1s infinite;
}
@keyframes leg-swing {
0%,
100% {
transform: rotate(-22deg);
}
50% {
transform: rotate(40deg);
}
}
@keyframes shoe-turn {
0%,
100% {
transform: rotate(-10deg) translateY(-5px) translateX(10px);
}
25% {
transform: rotate(0deg) translateY(0px) translateX(0);
}
50% {
transform: rotate(10deg) translateY(-10px) translateX(10px);
}
75% {
transform: rotate(0deg) translateY(-30px) translateX(0);
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>
</head>
<body>
<main>
<div class="frame">
<div class="invisible-men">
<div class="leg left">
<div class="shoe"></div>
</div>
<div class="leg right">
<div class="shoe"></div>
</div>
</div>
<div class="floor"></div>
</div>
</main>
</body>
</html>