-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWhackABugPage.css
More file actions
62 lines (56 loc) · 1.08 KB
/
WhackABugPage.css
File metadata and controls
62 lines (56 loc) · 1.08 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
.whack-a-bug-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
max-width: 400px;
margin: 0 auto;
}
.bug-hole {
width: 100px;
height: 100px;
background-color: rgba(255, 255, 255, 0.1);
border-radius: 50%;
position: relative;
cursor: pointer;
border: 2px solid rgba(255, 255, 255, 0.2);
transition: border-color 0.3s;
overflow: hidden;
}
.bug-hole:hover {
border-color: rgba(255, 255, 255, 0.5);
}
.bug {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 3rem;
animation: pop-up 0.3s ease-out;
}
@keyframes pop-up {
0% {
transform: translate(-50%, 50%) scale(0);
}
80% {
transform: translate(-50%, -60%) scale(1.1);
}
100% {
transform: translate(-50%, -50%) scale(1);
}
}
.whacked {
animation: whack-anim 0.2s ease-in;
color: #4ade80; /* green-400 */
}
@keyframes whack-anim {
0% {
transform: translate(-50%, -50%) scale(1);
}
50% {
transform: translate(-50%, -50%) scale(0.8);
}
100% {
transform: translate(-50%, -50%) scale(0);
opacity: 0;
}
}