H5熊猫弹跳小游戏

H5熊猫弹跳小游戏运行效果如下:
H5熊猫弹跳小游戏_第1张图片
主要代码如下:

DOCTYPE html>
<html manifest="offline.appcache">
<head>
    <meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>H5手机熊猫也疯狂游戏源码title>
	
	<link rel="manifest" href="app.manifest" />
	
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />

	<meta name="HandheldFriendly" content="true" />
	
	
	<meta name="mobile-web-app-capable" content="yes" />
    
	<style type="text/css">
		* {
			padding: 0;
			margin: 0;
		}
		html, body {
			background: #000;
			color: #fff;
			overflow: hidden;
			touch-action: none;
			-ms-touch-action: none;
		}
		canvas {
			touch-action-delay: none;
			touch-action: none;
			-ms-touch-action: none;
		}
    style>
head> 

<body> 
	<div id="fb-root">div>
	
	
	
	
	<div id="c2canvasdiv">
	
		
		<canvas id="c2canvas" width="480" height="854">
			
			
		canvas>
		
	div>
	
	
	
	
	<script src="jquery-2.0.0.min.js">script>


	
    
	<script src="c2runtime.js">script>

    <script>
		// Size the canvas to fill the browser viewport.
		jQuery(window).resize(function() {
			cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
		});
		
		// Start the Construct 2 project running on window load.
		jQuery(document).ready(function ()
		{			
			// Create new runtime using the c2canvas
			cr_createRuntime("c2canvas");
		});
		
		// Pause and resume on page becoming visible/invisible
		function onVisibilityChanged() {
			if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden)
				cr_setSuspended(true);
			else
				cr_setSuspended(false);
		};
		
		document.addEventListener("visibilitychange", onVisibilityChanged, false);
		document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);
		document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);
		document.addEventListener("msvisibilitychange", onVisibilityChanged, false);
		
    script>	
body> 
html> 

下载源码

你可能感兴趣的:(前端,jquery)