Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
||
<!--禁止电话号码和邮箱识别 | ||
<meta content="telephone=no,email=no" name="format-detection"/> | ||
--> | ||
<!--TODO:添加一个网页标题--> | ||
<title>A sample of HTML5 game</title> | ||
|
||
<!--TODO:改成你想要的缩放比例 | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" /> | ||
--> | ||
|
||
<style type="text/css"> | ||
html,body { | ||
margin: 0 0 0 0; | ||
padding: 0 0 0 0; | ||
width:100%; | ||
height:100%; | ||
} | ||
/*body { | ||
-webkit-user-select: none; | ||
-webkit-tap-highlight-color: rgba(0,0,0,0); | ||
-webkit-touch-callout: none; | ||
} | ||
|
||
* { | ||
-webkit-text-size-adjust:none; | ||
}*/ | ||
</style> | ||
|
||
<script type="text/javascript"> | ||
//关闭选择 | ||
//document.addEventListener("selectstart",function(e){ e.preventDefault(); }); | ||
//避免鼠标变成文本选择形状 | ||
//document.addEventListener("mousedown",function(e){ e.preventDefault(); }); | ||
//避免上下滚屏 | ||
/*document.addEventListener("touchmove",function(e){ | ||
if(e.touches.length == 2) | ||
e.preventDefault(); | ||
}, {passive:false}); | ||
document.addEventListener("touchmove",function(e){ | ||
if(e.touches.length == 1) | ||
e.preventDefault(); | ||
}, {passive:false}); | ||
document.addEventListener("touchstart",function(e){ | ||
e.preventDefault(); | ||
}, {passive:false});*/ | ||
document.addEventListener("touchmove",function(e){ | ||
if(e.touches.length == 1) | ||
e.preventDefault(); | ||
}, { | ||
passive:false | ||
}) | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<script src="./main.js"></script> | ||
</body> | ||
</html> |