@tojira/

snake (html)

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Snake</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div class="center">
      <div id="topmenu">
        <div class="menuleft">
          HIGHSCORE <data id="highscore">000</data>
        </div>
        <div class="menuright" id="nickname">
          PRESS C TO RESET HIGHSCORE
        </div>
      </div>
      <div id="botmenu">
        <div class="menuleft">
          SCORE <data id="score">000</data>
        </div>
        <div class="menuright" id="nickname">
          PRESS R TO REPlAY
        </div>
      </div>
    <canvas id="field"></canvas>
    </div>
    <script src="script.js"></script>
  </body>
</html>
result
console