const container = document.getElementById("falling-container"); function createFalling() { const img = document.createElement("img"); img.src = "/home/devel/Documents/anniv_bachir/chicken.png"; // image qui tombe img.className = "falling"; img.style.left = Math.random() * 100 + "vw"; img.style.animationDuration = (3 + Math.random() * 5) + "s"; container.appendChild(img); setTimeout(() => img.remove(), 8000); } setInterval(createFalling, 500);