initial commit
This commit is contained in:
44
fireworks.css
Normal file
44
fireworks.css
Normal file
@ -0,0 +1,44 @@
|
||||
/* Der Container für das Feuerwerk */
|
||||
.fireworks {
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
z-index: 10; /* Über andere Elemente legen */
|
||||
}
|
||||
|
||||
/* Jede Partikel eines Feuerwerks */
|
||||
.firework {
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.9); /* Standardfarbe */
|
||||
animation: explode 1s ease-out forwards;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
/* Animation für die Explosion */
|
||||
@keyframes explode {
|
||||
0% {
|
||||
transform: scale(0.5);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: translate(var(--x), var(--y)) scale(0.2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Optional: Farbwechsel für die Partikel */
|
||||
.firework:nth-child(odd) {
|
||||
background: rgba(255, 100, 100, 0.9); /* Rot */
|
||||
}
|
||||
|
||||
.firework:nth-child(even) {
|
||||
background: rgba(100, 100, 255, 0.9); /* Blau */
|
||||
}
|
||||
|
Reference in New Issue
Block a user