-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (43 loc) · 1.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<html>
<head>
<meta charset="UTF-8">
<title>狼吃羊</title>
<script type="text/javascript">
var cssEl = document.createElement('style');
document.documentElement.firstElementChild.appendChild(cssEl);
function setPxPerRem(){
var dpr = 1;
//把viewport分成10份的rem,html标签的font-size设置为1rem的大小;
var pxPerRem = document.documentElement.clientWidth * dpr / 10;
cssEl.innerHTML = 'html{font-size:' + pxPerRem + 'px!important;}';
}
setPxPerRem();
</script>
<link rel="stylesheet" type="text/css" href="css/menu.css">
</head>
<body>
<div id="container" ></div>
<div id="gameWithoutNet">双人单机</div>
<div id="gameWithNet">双人联机</div>
<div id="gameHelp">规则说明</div>
<footer>如果你在 QQ 或 微信中打开,为保证正常体验,请点击右上角用其他浏览器中打开</footer>
</body>
<script>
document.getElementById("gameWithoutNet").onclick = function () {
location.href = "nonet.html"
};
document.getElementById("gameWithNet").onclick = function () {
location.href = "withnet.html"
};
document.getElementById("gameHelp").onclick = function () {
location.href = "help.html"
};
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?ea71b19426afbce34c77b6c8c0318a78";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</html>