Add confetti effect on correct guess in number guessing game

This commit is contained in:
vista-man
2025-01-27 20:19:49 +01:00
parent 5b2c9b856e
commit bc5853e2ed
2 changed files with 46 additions and 0 deletions

View File

@@ -24,3 +24,30 @@ input, button {
font-size: 18px;
color: #555;
}
#confetti-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
overflow: hidden;
}
.confetti {
position: absolute;
width: 10px;
height: 10px;
background-color: #ff0;
animation: fall 3s linear infinite;
}
@keyframes fall {
0% {
transform: translateY(-100vh) rotate(0deg);
}
100% {
transform: translateY(100vh) rotate(360deg);
}
}