ptit flop
This commit is contained in:
parent
2aa25f13d3
commit
a3f77dc11d
2 changed files with 18 additions and 19 deletions
|
@ -23,8 +23,7 @@
|
|||
}
|
||||
|
||||
|
||||
/* Define keyframes for the confetti */
|
||||
@keyframes confettiFall {
|
||||
@keyframes PluieConfetti {
|
||||
0% {
|
||||
transform: translateY(-100px) rotate(0deg);
|
||||
opacity: 1;
|
||||
|
@ -35,16 +34,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* Confetti styles */
|
||||
.confetti {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 20px;
|
||||
animation: confettiFall 5s linear;
|
||||
animation: confettiFall 5s linear infinite;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* Confetti container to spawn confetti randomly */
|
||||
.confetti-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
@ -52,5 +49,5 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none; /* Prevent interaction */
|
||||
pointer-events: none; /* pour ne pas interagir avec les confettis */
|
||||
}
|
|
@ -310,7 +310,7 @@ function genererConfetti() {
|
|||
// couleurs des confetti à generer
|
||||
const colors = ["#FF5733", "#33FF57", "#3357FF", "#FF33A1", "#FFD633", "#A833FF", "#33FFF6"]
|
||||
|
||||
const nb_confetti = 50 // nombre de confettis
|
||||
const nb_confetti = 150 // nombre de confettis
|
||||
|
||||
for (let i = 0; i < nb_confetti; i++) {
|
||||
|
||||
|
@ -336,7 +336,9 @@ function genererConfetti() {
|
|||
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
// vide le conteneur à la fin pour ne pas surcharger la page d'elements
|
||||
|
||||
container.innerHTML = ""
|
||||
}, 10000);
|
||||
|
||||
}
|
Loading…
Reference in a new issue