-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday4.html
More file actions
129 lines (104 loc) · 2.58 KB
/
day4.html
File metadata and controls
129 lines (104 loc) · 2.58 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DAY 4 | CSS CHALLENGE</title>
<style>
:root {
--bg-container: #E56262;
--cubic-bezier: cubic-bezier(.21, .98, .6, .99);
--size: 30px;
--shadow-first: 2px 2px 3px 2px rgba(0, 0, 0, 0.2);
--transform-first: translate(-50%, -50%) scale(0);
--shadow-last: 10px 10px 15px 0 rgba(0, 0, 0, 0.3);
--transform-last: translate(-50%, -50%) scale(1);
}
body {
min-height: 100vh;
display: grid;
place-items: center;
}
.container {
padding: 8rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: .5rem;
background: var(--bg-container);
box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
position: relative;
}
.dot {
background-color: #fff;
border-radius: 50%;
box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
position: absolute;
top: 50%;
left: 50%;
animation: 2s var(--cubic-bezier) infinite alternate;
animation-fill-mode: both;
}
.dot-1 {
z-index: 3;
width: var(--size);
height: var(--size);
animation-name: jump-jump-1;
}
.dot-2 {
z-index: 2;
width: calc(var(--size) * 2);
height: calc(var(--size) * 2);
animation-name: jump-jump-2;
}
.dot-3 {
z-index: 1;
width: calc(var(--size) * 3);
height: calc(var(--size) * 3);
animation-name: jump-jump-3;
}
@keyframes jump-jump-1 {
0%,
70% {
box-shadow: var(--shadow-first);
transform: var(--transform-first);
}
100% {
box-shadow: var(--shadow-last);
transform: var(--transform-last);
}
}
@keyframes jump-jump-2 {
0%,
40% {
box-shadow: var(--shadow-first);
transform: var(--transform-first);
}
100% {
box-shadow: var(--shadow-last);
transform: var(--transform-last);
}
}
@keyframes jump-jump-3 {
0%,
10% {
box-shadow: var(--shadow-first);
transform: var(--transform-first);
}
100% {
box-shadow: var(--shadow-last);
transform: var(--transform-last);
}
}
</style>
</head>
<body>
<div class="container">
<div class="dot dot-1"></div>
<div class="dot dot-2"></div>
<div class="dot dot-3"></div>
</div>
</body>
</html>