diff --git a/h5/flipper/flipper.css b/h5/flipper/flipper.css index 3fd1217..ae6dcef 100644 --- a/h5/flipper/flipper.css +++ b/h5/flipper/flipper.css @@ -10,6 +10,17 @@ grid-gap: 1.25%; padding: 26.48148148148148% 16.34259259259259% 0 16.34259259259259%; } +.flipper .tip { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: auto; + background: center / 65.83333333333333% no-repeat url("./tip.png"), + rgba(0, 0, 0, 0.6); + z-index: 1; +} .flipper .meta { position: absolute; top: 16.6%; diff --git a/h5/flipper/game.js b/h5/flipper/game.js index 1853e88..1f8f4c5 100644 --- a/h5/flipper/game.js +++ b/h5/flipper/game.js @@ -23,6 +23,14 @@ export default class Game { this.init(); } init() { + const tip = document.createElement("div"); + tip.className = "tip"; + this.cardsContainer.appendChild(tip); + tip.addEventListener("click", (e) => { + e.stopPropagation(); + e.preventDefault(); + this.cardsContainer.removeChild(tip); + }); Object.assign(this, { steps: 40, score: 0, diff --git a/h5/flipper/tip.png b/h5/flipper/tip.png new file mode 100644 index 0000000..75aad60 Binary files /dev/null and b/h5/flipper/tip.png differ