Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
melonmasteristaken authored Jun 4, 2024
1 parent 7356ebc commit 149b57d
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
height: 100vh;
}

.fireflies::before {
content: "";
.firefly {
position: absolute;
top: 50%;
left: 50%;
Expand All @@ -27,39 +26,6 @@
border-radius: 50%;
box-shadow: 0 0 10px #ffff00; /* Glow effect */
animation: firefly 2s infinite;
/* Add randomness */
top: calc(50% + #{random(-200, 200)}px);
left: calc(50% + #{random(-200, 200)}px);
animation-delay: #{random(0.1, 2)}s;
}

.fireflies::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 10px;
height: 10px;
background-color: #ffff00; /* Yellow glow */
border-radius: 50%;
box-shadow: 0 0 10px #ffff00; /* Glow effect */
animation: firefly 2s infinite;
/* Add randomness */
top: calc(50% + #{random(-200, 200)}px);
left: calc(50% + #{random(-200, 200)}px);
animation-delay: #{random(2, 4)}s;
}

/* Add more ::before and ::after elements to generate more fireflies */

@keyframes firefly {
0% {
transform: translate(-50%, -50%);
}
100% {
transform: translate(calc(-50% + #{random(-20, 20)}px), calc(-50% + #{random(-20, 20)}px));
}
}
</style>

Expand Down

0 comments on commit 149b57d

Please sign in to comment.