Skip to content

Commit 9217556

Browse files
committed
crit thunder
1 parent 43f14c1 commit 9217556

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

crit.webp

48.3 KB
Loading

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<link rel="stylesheet" type="text/css" href="main.css">
88
</head>
99
<body>
10+
<img src="crit.webp" id="critImg">
1011
<div id="popup">
1112
<div id="popupText">
1213
0

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ const eventsTable = [
5252
action: () => {
5353
clickMeText.innerText = `You broke it`;
5454
playFart(critFart);
55+
critImg.animate([
56+
{ opacity: 0 },
57+
{ opacity: 1 },
58+
{ opacity: 0 }
59+
], {
60+
duration: 1000,
61+
fill: "forwards"
62+
});
5563
},
5664
},
5765
{

main.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
body {
2+
margin: 0;
3+
}
14
.center {
25
position: absolute;
36
left: 50%;
@@ -16,6 +19,13 @@
1619
user-select: none;
1720
-webkit-user-select: none;
1821
}
22+
#critImg {
23+
opacity: 0;
24+
position: absolute;
25+
height: 100%;
26+
width: 100%;
27+
object-fit: cover;
28+
}
1929
#popup {
2030
visibility: hidden;
2131
position: absolute;
@@ -35,4 +45,4 @@
3545
}
3646
.customCursor {
3747
cursor: url("peach-emoji.png"), auto;
38-
}
48+
}

0 commit comments

Comments
 (0)