eis-website/js/script.js

27 lines
No EOL
538 B
JavaScript

console.log ("Meine Seite läuft");
Für die fallenden Chips
function createChip() {
const chip = document.createElement("img");
chip.src = "img/Chips.png";
chip.classList.add("chip");
chip.style.left = Math.random() * window.innerWidth + "px";
chip.style.animationDuration =
(Math.random() * 3 + 3) + "s";
chip.style.width =
(Math.random() * 50 + 50) + "px";
document.body.appendChild(chip);
setTimeout(() => {
chip.remove();
}, 6000);
}
setInterval(createChip, 300);