diff --git a/mogura.css b/mogura.css index 22e7eb5..c2c678e 100644 --- a/mogura.css +++ b/mogura.css @@ -1,9 +1,9 @@ body {background: #804012; color: #fff; text-align: center; vertical-align: middle;} div {border: #ff8c00 solid 2px; background-color: #4d210b; - width: 7em; height: 7em; margin: 0 auto; border-radius: 50%;} + width: 7em; height: 7em; margin: 0 auto; border-radius: 50%; + float: left; margin: 2% 5%;} div img {width: 6em; margin-top: 0.3em;} -div {float: left; margin: 2% 5%;} #message {font-size: 150%;} #point {font-size: 150%;} hr {clear: left;} diff --git a/mogura.html b/mogura.html index 6447dc2..8a3a383 100644 --- a/mogura.html +++ b/mogura.html @@ -19,6 +19,8 @@

+ diff --git a/mogura.js b/mogura.js index 3b07d35..a8f03da 100755 --- a/mogura.js +++ b/mogura.js @@ -5,6 +5,7 @@ var tataki = ana+1; tataki2 = ana+1; //存在しないdivs添字 var msgArea = null; ptArea = null; function countdown() { + console.log('countdown'); msgArea.innerText = `残り ${count}秒`; if (count<=0) { stop(); @@ -14,17 +15,20 @@ count --; } function start() { + console.log('start'); startButton.disabled = true; rand(); countdown(); } function stop() { + console.log('stop'); alert("しゅーーりょーー"); ptArea.innerText = `今回のスコア: ${point}回`; //ptArea ptArea.style.textDecoration = "underline"; //atari.innerHTML = "" //もぐら画像削除 } function whack() { // whack-a-mole(英):モグラ叩き + console.log('whack'); if (count>=0) { // 時間すぎると加算されない point ++; ptArea.innerText = `現在: ${point}回`; @@ -35,6 +39,7 @@ } } function rand() { + console.log('rand'); var divs = document.querySelectorAll("div"); tataki2 = Math.floor(Math.random()*ana); if (count>=0) { @@ -50,6 +55,7 @@ } } function init() { + console.log('init'); var divs = document.querySelectorAll("div"); //for (i=0;i