diff --git a/css/common.css b/css/common.css index bb73c48..cb4c547 100644 --- a/css/common.css +++ b/css/common.css @@ -326,7 +326,24 @@ body { left: 50%; transform: translate(-50%, -50%); font-size: 2.5rem; - color: red; + color: white; z-index: 9999; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); + text-shadow: 0 0 10px rgba(255, 255, 0, 0.9); +} + +#count-number { + font-size: 30px; + text-shadow: 0 0 10px rgba(255, 255, 0, 0.9); + margin-bottom: 20px; +} + +#count-down p:nth-of-type(1) { + font-size: 17px; + margin-bottom: 20px; + text-shadow: 0 0 10px rgba(255, 255, 0, 0.9); +} + +#count-down p:nth-of-type(3) { + font-size: 27px; + color: yellow; } diff --git a/js/dinosaur/dinosaur.js b/js/dinosaur/dinosaur.js index edcd15e..94bb630 100644 --- a/js/dinosaur/dinosaur.js +++ b/js/dinosaur/dinosaur.js @@ -106,7 +106,10 @@ function updateGameContent() { -
+ + `; loadScript("js/dinosaur/main.js"); diff --git a/js/dinosaur/main.js b/js/dinosaur/main.js index 87093d6..ce99d17 100644 --- a/js/dinosaur/main.js +++ b/js/dinosaur/main.js @@ -120,14 +120,18 @@ let count = 10; countdown = document.createElement("div"); // 전역 변수 countdown에 할당 countdown.id = "count-down"; - countdown.textContent = count; countdown.style.display = "block"; console.log(countdown.style.display); countdownInterval = setInterval(() => { - count--; console.log(count); - countdown.textContent = count; + document.getElementById("count-number").textContent = count; + countdown.innerHTML = ` +CONTINUE?
+${count}
+INSERT COIN
+ `; + count--; if (count === 0) { clearInterval(countdownInterval); // 10초 카운트가 끝나면 아래 코드 실행