-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday39.html
More file actions
105 lines (86 loc) · 1.97 KB
/
day39.html
File metadata and controls
105 lines (86 loc) · 1.97 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DAY 39 | CSS CHALLENGE</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
main {
display: grid;
place-items: center;
min-height: 100vh;
}
.frame {
width: 400px;
height: 400px;
border-radius: 1rem;
box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
background: #8e44ad;
position: relative;
}
.egg {
position: absolute;
width: 100px;
height: 130px;
top: 135px;
left: 150px;
background: #fff;
border-radius: 50px 50px 50px 50px/80px 80px 50px 50px;
animation: egg 3s ease-in-out infinite;
transform-origin: 50% 80%;
}
@keyframes egg {
0% {
transform: translate3d(0, -350px, 0) scale(0.8, 1.2);
}
25% {
transform: translate3d(0, 40px, 0) scale(1.05, 0.9);
}
30% {
transform: translate3d(0, -20px, 0) scale(0.95, 1.02);
}
35% {
transform: translate3d(0, 10px, 0) scale(1.01, 0.98);
}
40%,
45% {
transform: translate3d(0, 0, 0) scale(1) rotate(0);
}
50% {
transform: translate3d(0, 0, 0) scale(1) rotate(5deg);
}
55% {
transform: translate3d(0, 0, 0) scale(1) rotate(-5deg);
}
60% {
transform: translate3d(0, 0, 0) scale(1) rotate(5deg);
}
65%,
70% {
transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
}
75% {
transform: translate3d(0, 10px, 0) scale(1.01, 0.98);
}
80% {
transform: translate3d(0, -20px, 0) scale(1.02, 0.95);
}
100% {
transform: translate3d(0, 350px, 0) scale(0.9, 1.1);
}
}
</style>
</head>
<body>
<main>
<div class="frame">
<div class="egg"></div>
</div>
</main>
</body>
</html>