diff --git a/CSS/couloir.css b/CSS/couloir.css index ebeb7f8..088c8c2 100644 --- a/CSS/couloir.css +++ b/CSS/couloir.css @@ -9,6 +9,10 @@ body { height: 95vh; } + @keyframes fondu { + 100% {opacity : 0;} + } + header { color: #BF0909; font-family: 'Special Elite', cursive; diff --git a/JAVASCRIPT/couloir.js b/JAVASCRIPT/couloir.js index 5157de1..37de9cb 100644 --- a/JAVASCRIPT/couloir.js +++ b/JAVASCRIPT/couloir.js @@ -4,12 +4,14 @@ let body = document.getElementById("body"); // -------------- FUNCTIONS -------------// function handleLienCryptoClicked() { + lienCrypto.removeEventListener("click", handleLienCryptoClicked); let audioPas = document.createElement("audio"); audioPas.setAttribute("preload", "auto"); audioPas.setAttribute("autoplay", true); audioPas.setAttribute("src", "../Sounds/pas_insaide.mp3"); audioPas.style.cssText = "z-index: -1; opacity: 0;"; body.appendChild(audioPas); + body.style.cssText = "animation : fondu 5s forwards" setTimeout(() => { lienCrypto.setAttribute("href", "./crypto_seul.html");