您现在的位置是:网站首页>前端技术>HTML5HTML5

用js+HTML5实现的小游戏-- 捕鱼达人游戏

神夜2020-10-30 09:10:14HTML51515人已围观文章来源:PHP中文网

简介大家基本上都玩过捕鱼达人这款游戏吧,下面我就来一个用js+HTML5实现的小游戏

大家基本上都玩过捕鱼达人这款游戏吧,下面我就来一个用js+HTML5实现的小游戏

2. [代码]

<!doctype html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="images/icon.png"/>
<link rel="apple-touch-startup-image" href="images/icon.png" />

<style type="text/css">
body, p, canvas
{
    image-rendering: optimizeSpeed;
    -webkit-image-rendering: optimizeSpeed;
    -webkit-interpolation-mode: nearest-neighbor;
}
body{padding:0; margin:0;font-size:12px;background-color:#000;}
body, html{height: 100%;}
#outer{height:100%; overflow:hidden; position:relative; width:100%;}
#outer[id]{display:table; position:static;}
#middle{position:absolute; top:50%;} /* for ie only*/
#middle[id]{display:table-cell; vertical-align:middle; position:static;}
</style>

<title>Fish Joy in HTML5</title>

<script type="text/javascript" src="js/quark.base-1.0.0.alpha.min.js"></script>
<!--<script type="text/javascript" src="fishjoy.game.js"></script>-->
<script type="text/javascript" src="src/R.js"></script>
<script type="text/javascript" src="src/Utils.js"></script>
<script type="text/javascript" src="src/fishjoy.js"></script>
<script type="text/javascript" src="src/FishManager.js"></script>
<script type="text/javascript" src="src/FishGroup.js"></script>
<script type="text/javascript" src="src/views/Fish.js"></script>
<script type="text/javascript" src="src/views/Cannon.js"></script>
<script type="text/javascript" src="src/views/Bullet.js"></script>
<script type="text/javascript" src="src/views/Num.js"></script>
<script type="text/javascript" src="src/views/Player.js"></script>

</head>

<body>

<p id="outer">
	<p id="middle">
		<p id="container" style="position:relative;width:980px;height:545px;top:-50%;margin:0 auto;"></p>
		<p id="msg"></p>
	</p>
</p>
<p id="fps" style="position:absolute;top:0;left:0;color:#fff;"></p>

</body>

</html>

以上就是用js+HTML5实现的小游戏-- 捕鱼达人游戏的详细内容,更多请关注php中文网其它相关文章!

站点信息

  • 建站时间:2017-10-24
  • 网站程序:Hsycms 3.0
  • 文章统计:288条
  • 微信公众号:扫描二维码,关注我们
分享按钮