-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday87.html
More file actions
110 lines (92 loc) · 1.83 KB
/
day87.html
File metadata and controls
110 lines (92 loc) · 1.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DAY 87 | CSS CHALLENGE</title>
<style>
*,
*::after,
*::before {
padding: 0;
margin: 0;
box-sizing: border-box;
}
main {
display: grid;
place-items: center;
min-height: 100vh;
background: #34495e;
}
.cradle {
position: relative;
width: 200px;
height: 40px;
padding-top: 100px;
display: flex;
}
.cradle:before {
content: "";
position: absolute;
width: 200px;
height: 6px;
top: 0;
left: 0;
border-radius: 3px;
background: #bdc3c7;
}
.cradle .ball {
position: relative;
width: 40px;
height: 40px;
background: #fff;
border-radius: 50%;
transform-origin: 50% -100px;
}
.cradle .ball:before {
content: "";
position: absolute;
height: 100px;
width: 1px;
top: -100px;
left: 19px;
background: #bdc3c7;
}
.cradle .ball-1 {
animation: ball-1 0.8s ease-out infinite alternate;
}
.cradle .ball-5 {
animation: ball-5 0.8s ease-out 0.8s infinite alternate;
}
@keyframes ball-1 {
0%,
50% {
transform: rotate(0);
}
100% {
transform: rotate(30deg);
}
}
@keyframes ball-5 {
0%,
50% {
transform: rotate(0);
}
100% {
transform: rotate(-30deg);
}
}
</style>
</head>
<body>
<main>
<div class="cradle">
<div class="ball ball-1"></div>
<div class="ball ball-2"></div>
<div class="ball ball-3"></div>
<div class="ball ball-4"></div>
<div class="ball ball-5"></div>
</div>
</main>
</body>
</html>