transition + bruit de pas dans couloir

This commit is contained in:
Florian Ehr 2020-12-15 17:52:18 +01:00
parent 0d0602b49e
commit d50a27a849
2 changed files with 6 additions and 0 deletions

View file

@ -9,6 +9,10 @@ body {
height: 95vh;
}
@keyframes fondu {
100% {opacity : 0;}
}
header {
color: #BF0909;
font-family: 'Special Elite', cursive;

View file

@ -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");