transition + bruit de pas dans couloir

這個提交存在於:
Florian Ehr 2020-12-15 17:52:18 +01:00
父節點 0d0602b49e
當前提交 d50a27a849
共有 2 個檔案被更改,包括 6 行新增0 行删除

查看文件

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

查看文件

@ -4,12 +4,14 @@ let body = document.getElementById("body");
// -------------- FUNCTIONS -------------// // -------------- FUNCTIONS -------------//
function handleLienCryptoClicked() { function handleLienCryptoClicked() {
lienCrypto.removeEventListener("click", handleLienCryptoClicked);
let audioPas = document.createElement("audio"); let audioPas = document.createElement("audio");
audioPas.setAttribute("preload", "auto"); audioPas.setAttribute("preload", "auto");
audioPas.setAttribute("autoplay", true); audioPas.setAttribute("autoplay", true);
audioPas.setAttribute("src", "../Sounds/pas_insaide.mp3"); audioPas.setAttribute("src", "../Sounds/pas_insaide.mp3");
audioPas.style.cssText = "z-index: -1; opacity: 0;"; audioPas.style.cssText = "z-index: -1; opacity: 0;";
body.appendChild(audioPas); body.appendChild(audioPas);
body.style.cssText = "animation : fondu 5s forwards"
setTimeout(() => { setTimeout(() => {
lienCrypto.setAttribute("href", "./crypto_seul.html"); lienCrypto.setAttribute("href", "./crypto_seul.html");