• H5游戏源码分享-网页版2048小游戏


    H5游戏源码分享-网页版2048小游戏

    玩过的都懂

    1. html>
    2. <html>
    3. <head>
    4. <meta charset="utf-8">
    5. <title>分享2048到朋友圈,将免费参加南山郡8.17号啤酒狂欢节!title>
    6. <link href="style/main.css" rel="stylesheet" type="text/css">
    7. <link rel="shortcut icon" href="favicon.ico">
    8. <link rel="apple-touch-icon" href="meta/apple-touch-icon.png">
    9. <link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)">
    10. <link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)">
    11. <meta name="apple-mobile-web-app-capable" content="yes">
    12. <meta name="apple-mobile-web-app-status-bar-style" content="black">
    13. <meta name="HandheldFriendly" content="True">
    14. <meta name="MobileOptimized" content="320">
    15. <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
    16. head>
    17. <script>
    18. lastScrollY=0;
    19. function heartBeat(){
    20. var diffY;
    21. if (document.documentElement && document.documentElement.scrollTop)
    22. diffY = document.documentElement.scrollTop;
    23. else if (document.body)
    24. diffY = document.body.scrollTop
    25. else
    26. {/*Netscape stuff*/}
    27. percent=.1*(diffY-lastScrollY);
    28. if(percent>0)percent=Math.ceil(percent);
    29. else percent=Math.floor(percent);
    30. document.getElementById("full").style.top=parseInt(document.getElementById("full").style.top)+percent+"px";
    31. lastScrollY=lastScrollY+percent;
    32. }
    33. suspendcode="
      返回顶部
      "
    34. document.write(suspendcode);
    35. window.setInterval("heartBeat()",1);
    36. script>
    37. <body>
    38. <div class="container">
    39. <div class="heading">
    40. <h1 class="title">2048h1>
    41. <div class="scores-container">
    42. <div class="score-container">0div>
    43. <div class="best-container">0div>
    44. div>
    45. div>
    46. <div class="above-game">
    47. <p class="game-intro"><a href="http://mp.weixin.qq.com/s?__biz=MjM5ODMzMjk5Nw==&mid=200442232&idx=1&sn=bb981cf0ec10bc9bf28f24179744f511&from=singlemessage&isappinstalled=0#rd" target="_blank"><img src="140x50.png" width="140" height="50" longdesc="http://game2.id87.com/">a>p>
    48. <a class="restart-button">点我开始a>
    49. div>
    50. <div class="game-container">
    51. <div class="game-message">
    52. <p>p>
    53. <div class="lower">
    54. <a class="keep-playing-button">Keep goinga>
    55. <a class="retry-button">再玩一次a>
    56. div>
    57. div>
    58. <div class="grid-container">
    59. <div class="grid-row">
    60. <div class="grid-cell">div>
    61. <div class="grid-cell">div>
    62. <div class="grid-cell">div>
    63. <div class="grid-cell">div>
    64. div>
    65. <div class="grid-row">
    66. <div class="grid-cell">div>
    67. <div class="grid-cell">div>
    68. <div class="grid-cell">div>
    69. <div class="grid-cell">div>
    70. div>
    71. <div class="grid-row">
    72. <div class="grid-cell">div>
    73. <div class="grid-cell">div>
    74. <div class="grid-cell">div>
    75. <div class="grid-cell">div>
    76. div>
    77. <div class="grid-row">
    78. <div class="grid-cell">div>
    79. <div class="grid-cell">div>
    80. <div class="grid-cell">div>
    81. <div class="grid-cell">div>
    82. div>
    83. div>
    84. <div class="tile-container">
    85. div>
    86. div>
    87. <hr>
    88. <p><strong><a href="http://wx.vdcom.cn" target="_blank">金华微资源网络技术支持a>strong>p>
    89. <p><strong>玄元南山郡首期8月17日盛大开盘,关注xynsj0579免费参加安地楼盘现场的啤酒节!strong>p>
    90. div>
    91. <script>
    92. var my_list = {2:'九头虫',4:'白龙马',8:'沙僧',16:'猪八戒',32:'孙悟空',64:'唐僧',128:'观音',256:'弥勒佛',512:'上老君',1024:'如来佛',2048:'神笔记',4096:'http://iduanzi.qiniudn.com/tuoguang/4096.jpg',8192:'http://iduanzi.qiniudn.com/tuoguang/8192.jpg',16384:'http://iduanzi.qiniudn.com/tuoguang/16384.jpg',32768:'32768',65536:'65536',131072:'131072',262144:'262144',524288:'524288',1048576:'1048576',2097152:'2097152',4194304:'4194304',8388608:'8388608',16777216:'16777216',33554432:'33554432',67108864:'67108864',134217728:'134217728',268435456:'268435456',536870912:'536870912',1073741824:'1073741824',2147483648:'2147483648'}
    93. var my_mark = {2:'快来变身吧!',4:'小白马就挂了!',8:'沙和尚,是你吗',16:'对小猪就是你!',32:'悟空,等等我!',64:'打雷啦,收衣服啦',128:'普渡众生!',256:'阿弥托福!',512:'你这泼猴,不像话!',1024:'五指山压死你',2048:'恭喜!终于见到本尊了! ',4096:'强者!太伟大了!',8192:'你有这么厉害呀!',16384:'你已跳出三界之外了!',32768:'Game Over, HiScore: 32768',65536:'Game Over, HiScore: 65536',131072:'Game Over, HiScore: 131072',262144:'Game Over, HiScore: 262144',524288:'Game Over, HiScore: 524288',1048576:'Game Over, HiScore: 1048576',2097152:'Game Over, HiScore: 2097152',4194304:'Game Over, HiScore: 4194304',8388608:'Game Over, HiScore: 8388608',16777216:'Game Over, HiScore: 16777216',33554432:'Game Over, HiScore: 33554432',67108864:'Game Over, HiScore: 67108864',134217728:'Game Over, HiScore: 134217728',268435456:'Game Over, HiScore: 268435456',536870912:'Game Over, HiScore: 536870912',1073741824:'Game Over, HiScore: 1073741824',2147483648:'Game Over, HiScore: 2147483648'}
    94. var my_goal = 1024;
    95. script> <script src="js/bind_polyfill.js">script>
    96. <script src="js/classlist_polyfill.js">script>
    97. <script src="js/animframe_polyfill.js">script>
    98. <script src="js/keyboard_input_manager.js">script>
    99. <script src="js/html_actuator.js">script>
    100. <script src="js/grid.js">script>
    101. <script src="js/tile.js">script>
    102. <script src="js/local_storage_manager.js">script>
    103. <script src="js/game_manager.js">script>
    104. <script src="js/application.js">script>
    105. body>
    106. html>

    项目地址:https://download.csdn.net/download/Highning0007/88536696

  • 相关阅读:
    vue-h5移动Web的rem配置
    Java工具库——FastJson的40个常用方法
    说白了,在工作上,项目经理真离不开这2个字
    VUE 数据分页
    int类的前置++和后置++的实现
    Android原生插件开发-包名篇
    网络基础1
    聊一聊微服务常见配置中心工作原理
    RabbitMQ学习笔记(消息发布确认,死信队列,集群,交换机,持久化,生产者、消费者)
    某商业银行核心存储选型实践经验
  • 原文地址:https://blog.csdn.net/Highning0007/article/details/134409757