index.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <!-- <link async rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
  5. integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> -->
  6. <script type="text/javascript" src="../js/jquery.min.js" crossorigin="anonymous"></script>
  7. <link rel="stylesheet" href="../css/bootstrap.min.css" crossorigin="anonymous">
  8. <script type="text/javascript" src="../js/bootstrap.min.js" crossorigin="anonymous"></script>
  9. <link rel="stylesheet" href="../css/style.css">
  10. <link rel="preconnect" href="https://fonts.gstatic.com">
  11. <link href="https://fonts.loli.net/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700
  12. &family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  13. <title>五子</title>
  14. <meta charset="UTF-8">
  15. <style>
  16. * {
  17. padding: 0;
  18. margin: 0;
  19. }
  20. html,
  21. body,
  22. #five {
  23. background: #ccc;
  24. height: 100%;
  25. }
  26. .controls {
  27. /* position: absolute; */
  28. top: 20px;
  29. margin: 5px;
  30. }
  31. #game {
  32. width: 580px;
  33. height: 580px;
  34. /* box-shadow: 2px 2px 5px #333333; */
  35. /* text-align: center; */
  36. padding: 10px;
  37. background: rgba(0, 0, 0, 0.2);
  38. }
  39. table {
  40. width: 560px;
  41. border-collapse: collapse;
  42. border-spacing: 0;
  43. }
  44. td {
  45. width: 35px;
  46. height: 35px;
  47. text-align: center;
  48. }
  49. span {
  50. transition-duration: 100ms;
  51. display: inline-block;
  52. border-radius: 50%;
  53. width: 28px;
  54. height: 28px;
  55. vertical-align: middle;
  56. cursor: pointer;
  57. }
  58. .led {
  59. transition-duration: 100ms;
  60. display: inline-block;
  61. border: 5px double grey;
  62. border-radius: 50%;
  63. width: 18px;
  64. height: 18px;
  65. z-index: 10;
  66. vertical-align: middle;
  67. }
  68. .word {
  69. background: radial-gradient(transparent, rgb(15 15 15 / 25%));
  70. transition-duration: 100ms;
  71. display: inline-block;
  72. padding: 3px 6px;
  73. border: 5px double grey;
  74. z-index: 10;
  75. vertical-align: middle;
  76. }
  77. .red{
  78. filter: drop-shadow(0 0 2px red);
  79. outline: 5px dashed rgba(234, 71, 71, 0.5);
  80. }
  81. span::after {
  82. content: "";
  83. height: 0;
  84. display: inline-block;
  85. vertical-align: middle;
  86. }
  87. .black {
  88. box-shadow: 1px 1px 2px rgba(115, 115, 115, 0.7);
  89. background: #000;
  90. cursor: default;
  91. }
  92. .white {
  93. box-shadow: 1px 1px 2px rgba(115, 115, 115, 0.7);
  94. background: #fff;
  95. cursor: default;
  96. }
  97. .highlight.black {
  98. filter: drop-shadow(0 0 5px black);
  99. }
  100. .highlight.white {
  101. filter: drop-shadow(0 0 5px white);
  102. }
  103. .red:active {
  104. background: radial-gradient(transparent, rgb(15 15 15 / 25%));
  105. }
  106. .word:focus:not(:focus-visible) {
  107. background: radial-gradient(transparent, rgb(15 15 15 / 25%));
  108. outline: 0;
  109. }
  110. .tables {
  111. top: 0;
  112. left: 0;
  113. z-index: 3;
  114. }
  115. #xq-tips {
  116. position: absolute;
  117. top: 20%;
  118. left: 0;
  119. width: 100%;
  120. height: 150px;
  121. background: rgba(0, 0, 0, 0);
  122. display: none;
  123. z-index: 4;
  124. backdrop-filter: blur(5px);
  125. }
  126. .xq-txt {
  127. position: relative;
  128. height: 150px;
  129. background: rgba(35, 35, 35, 0.5);
  130. top: 0;
  131. bottom: 0;
  132. right: 0;
  133. left: 0;
  134. margin: auto;
  135. color: #fff;
  136. font-size: 40px;
  137. text-align: center;
  138. line-height: 150px;
  139. }
  140. #agin {
  141. display: none;
  142. }
  143. #regret {
  144. display: none;
  145. }
  146. .pointer {
  147. display: none;
  148. transition-duration: 100ms;
  149. pointer-events: none;
  150. position: absolute;
  151. opacity: 50%;
  152. left: 0;
  153. top: 0;
  154. z-index: 10;
  155. }
  156. .btn {
  157. text-shadow: rgb(85, 85, 85) 3px 2px 4px;
  158. }
  159. .noshadow {
  160. text-shadow: none;
  161. }
  162. input {
  163. outline-style: none;
  164. text-shadow: rgb(85, 85, 85) 3px 2px 4px;
  165. border: 1px solid #ccc;
  166. border-radius: 2px;
  167. background: rgb(215 215 215 / 50%);
  168. }
  169. input:hover {
  170. outline-style: none;
  171. text-shadow: rgb(85, 85, 85) 3px 2px 4px;
  172. border: 1px solid #ccc;
  173. border-radius: 2px;
  174. background: rgb(215 215 215 / 40%);
  175. }
  176. </style>
  177. <script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
  178. <title>Document</title>
  179. </head>
  180. <body>
  181. <div id="five">
  182. <div class="controls">
  183. <a class="btn btn-info" href="/"><i class="glyphicon glyphicon-home" aria-hidden="true"></i>&nbsp;返回</a>
  184. <button class="btn btn-primary" id="begin"><i class=" glyphicon glyphicon-ban-circle"
  185. aria-hidden="true"></i>&nbsp;开始游戏</button>
  186. <div class="btn-group">
  187. <button class="btn btn-primary" id="agin"><i class=" glyphicon glyphicon-repeat"
  188. aria-hidden="true"></i>&nbsp;重新游戏</button>
  189. <button class="btn btn-warning" id="regret"><i class=" glyphicon glyphicon-backward"
  190. aria-hidden="true"></i>&nbsp;悔棋</button>
  191. <button class="btn btn-info" id="check"><i class=" glyphicon glyphicon-exclamation-sign"
  192. aria-hidden="true"></i>&nbsp;下哪了</button>
  193. </div>
  194. <button class="btn btn-default noshadow" id="help"
  195. onclick="alert('说明:普通五子棋,需双人对战,同一设备只能使用一种颜色。\n(找不到同伴可以自己用两个设备玩)\n右侧按钮可用于发送信号,但请勿频繁点击。\n两个指示灯分别表示自身颜色和当前颜色,两者相同时说明该你了')"><i
  196. class="glyphicon glyphicon-question-sign" aria-hidden="true"></i></button>
  197. <div class="led mylight"></div>
  198. <div class="led light"></div>
  199. <button class="btn btn-danger word message1">快</button>
  200. <button class="btn btn-danger word message2">再想想?</button>
  201. <button class="btn btn-danger word message3">拜拜</button>
  202. <button class="btn btn-danger word message4"><input id="messageText"></button>
  203. </div>
  204. <div id="game" class="center-block">
  205. <span class="black pointer"></span>
  206. </div>
  207. <div style="display:inline-block">在线人数:<il id="messageServer"></il>
  208. </div>
  209. </div>
  210. </div>
  211. <script src="../js/chess.js"></script>
  212. </body>
  213. </html>