Skip to main content
Cookie Consent mit Real Cookie Banner
document.addEventListener("DOMContentLoaded", function() {
const container = document.createElement("div");
container.className = "snowfall-container";
document.body.appendChild(container);
function createSnowflake() {
const snowflake = document.createElement("div");
snowflake.className = "snowflake";
snowflake.textContent = "❄️";
snowflake.style.left = `${Math.random() * 100}%`;
snowflake.style.animationDuration = `${Math.random() * 3 + 8}s`; // random duration between 8s and 11s
container.appendChild(snowflake);
// Remove snowflake after animation to avoid clutter
snowflake.addEventListener("animationend", () => snowflake.remove());
}
// Generate a snowflake every 300ms
setInterval(createSnowflake, 300);
});