Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5.  
  6. <title> PONG </title>
  7.  
  8. <style>
  9. #myCanvas {
  10. outline: 1px solid black;
  11. }
  12. body {
  13. padding: 10px;
  14. }
  15.  
  16. #container {
  17. height: 400px;
  18. position: relative;
  19. width: 400px;
  20. }
  21.  
  22. #viewport {
  23. height: 100%;
  24. width: 100%;
  25. }
  26.  
  27. #controls {
  28. bottom: 0;
  29. left: 0;
  30. position: absolute;
  31. width: 100%;
  32. float: right;
  33. }
  34.  
  35. .button {
  36. display: inline-block;
  37. border-radius: 10px;
  38. background-color: black;
  39. border: none;
  40. color: #FFFFFF;
  41. text-align: center;
  42. font-size: 32px;
  43. font-family: Impact;
  44. padding: 9px;
  45. width: 200px;
  46. transition: all 0.5s;
  47. cursor: pointer;
  48. }
  49.  
  50.  
  51. #singButt{
  52. display: inline-block;
  53. border-radius: 10px;
  54. background-color: black;
  55. border: none;
  56. color: #FFFFFF;
  57. text-align: center;
  58. font-size: 28px;
  59. font-family: Impact;
  60. padding: 9px;
  61. width: 170px;
  62. transition: all 0.5s;
  63. cursor: pointer;
  64. margin: 5px;
  65. }
  66.  
  67. #multButt{
  68. display: inline-block;
  69. border-radius: 10px;
  70. background-color: black;
  71. border: none;
  72. color: #FFFFFF;
  73. text-align: center;
  74. font-size: 28px;
  75. font-family: Impact;
  76. padding: 9px;
  77. width: 170px;
  78. transition: all 0.5s;
  79. cursor: pointer;
  80. margin: 5px;
  81. }
  82.  
  83. .button span {
  84. cursor: pointer;
  85. display: inline-block;
  86. position: relative;
  87. transition: 0.5s;
  88. }
  89.  
  90. .button span:after {
  91. content: '\00bb';
  92. position: absolute;
  93. opacity: 0;
  94. top: 0;
  95. right: -20px;
  96. transition: 0.5s;
  97. }
  98.  
  99. .button:hover span {
  100. padding-right: 25px;
  101. }
  102.  
  103. .button:hover span:after {
  104. opacity: 1;
  105. right: 0;
  106. }
  107. </style>
  108.  
  109. </head>
  110.  
  111. <body>
  112. <div id="container">
  113. <canvas id="myCanvas" width="600" height="400" style="z-index: 1;"></canvas>
  114. <canvas id="gameOver" width="600" height="400" style="z-index: 2;">></canvas>
  115. <menu id="controls">
  116. <button id="newGameButton" class="button" style="position: absolute; top:20px; left:0px;" onclick="newGame()"><span>New Game</span></button>
  117.  
  118. <button id="singButt" style="position: absolute; top:20px; left:250px;" onclick="singleplayerButt()" width="5"><span>Singleplayer</span></button>
  119. <button id="multButt" style="position: absolute; top:20px; left: 430px;" onclick="multiplayerButt()" width="5"><span>Multiplayer</span></button>
  120.  
  121. </menu>
  122. </div>
  123. <script src="pongGame1.js"></script>
  124. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement