-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.html
172 lines (163 loc) · 5.71 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>中国象棋 online</title>
<style>
html,
body {
margin: 0;
padding: 0;
background: black;
overflow: hidden;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
}
#box {
font-family: 'xingkai';
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
position: relative;
top: 0;
left: 0;
text-align: center;
font-size: 2.5vmin;
}
#map {
position: absolute;
left: 50%;
top: 50%;
padding: 0px;
margin: 0;
border: 0.06rem solid darkgoldenrod;
background: rgba(249, 216, 162, 1);
}
</style>
<link rel="stylesheet" type="text/css" href="./css/view.css"/>
<link href="./css/css/font-awesome.css" rel="stylesheet">
<script>
(function() {
//rem 与屏幕/字体大小比例计算
var userFontSize = parseFloat(getComputedStyle(document.documentElement, false)['fontSize']);
var ratio = 16 / userFontSize;
var fontSize = (innerWidth / 1536 * 0.625) * 10 * ratio;
document.documentElement.style.fontSize = fontSize + "rem";
// if(innerWidth<=768){
// var userFontSize = parseFloat(getComputedStyle(document.documentElement, false)['fontSize']);
// var ratio = 16 / userFontSize;
// var fontSize = (innerWidth / 1536 * 0.625) * 10 * ratio;
// document.documentElement.style.fontSize = fontSize + "rem";
// }
// window.onresize = function() {
// fontSize = (innerWidth / 1536 * 0.625) * 10 * ratio;
// document.documentElement.style.fontSize = fontSize + "rem";
//}
})();
</script>
<!--<script src="http://livejs.com/live.js"></script>-->
<!--<script src="js/live.js"></script>-->
<script src="js/socket.io.min.js"></script>
<script src="js/axios0.18.min.js"></script>
</head>
<body>
<div id="box">
<canvas id="map"></canvas>
<audio src="audio/MOVE.WAV" hidden="hidden" id="audioClick"></audio>
<audio src="audio/go.wav" hidden="hidden" id="audioGo"></audio>
<audio src="audio/kill.wav" hidden="hidden" id="audioKill"></audio>
<audio src="audio/dong.wav" hidden="hidden" id="audioEat"></audio>
<form class="form" id="login">
<div class="inputPosition" id="loginName"><span>账 号:</span><input type="text" class="inputStyle" value="" maxlength="6" autocomplete="on" placeholder="请输入账号"/></div>
<div class="inputPosition" id="loginPassWord"><span>密 码:</span><input type="password" class="inputStyle" value="" maxlength="18" autocomplete="on" placeholder="请输入密码"/></div>
<div id="loginBtn" class="formBtn">登录</div>
<div id="regBtn" class="formBtn">注册</div>
<div id="youkeBtn" class="formBtn">游客</div>
<div id="forgetBtn" class="formBtn">忘记密码</div>
</form>
<div id="gameMainMenu">
<div id="singlePlay">单机对战</div>
<div id="btnMenuChat">聊天室</div>
<div id="btnMenuPlay">加入房间</div>
<div id="btnMenuCrateRoom">创建房间</div>
<div id="btnMenuChessRecord">棋谱</div>
<div id="btnMenuUserInfo">用户信息</div>
<div id="btnMenuGameSet">游戏设置</div>
</div>
<div id="btnOnlinePlay">
<div class="room">1000</div>
<div class="room">1002</div>
<div class="room">1001</div>
</div>
<div id="gameMenu" style="display: none;">游戏菜单</div>
<div id="Chessboard">
棋谱
</div>
<div id="chat" class=''>
<div id="chat_title">在线交流<span class="chat_title_onlineNum"></span>
</div><i class="fa fa-close"><span></span></i>
<div id="chat_body" class="chat_center">
<div id="chat_main">
<div id="chat_main_info">
<!--别人的-->
<div class="other_info">
</div>
</div>
</div>
<div id="chat_input" contenteditable="true">
</div>
<i class="" id="onlineNum" title="在线人数"></i>
<i class="fa fa-smile-o" id="biaoqing" title="选择表情">
<div id="biaoqing_box"></div>
</i>
<div id="btnSend">发送</div>
</div>
<div id="setName">
<input type="text" id="" value="" placeholder="输入您的昵称" maxlength="6" />
<div id="selfName"></div>
<div id="smile" class="fa fa-paper-plane-o"></div>
<!--头像列表-->
<div id="smileList">
<div>选择您的头像</div>
<i class="fa fa-paper-plane-o"></i>
<i class="fa fa-user-o"></i>
<i class="fa fa-github"></i>
<i class="fa fa-android"></i>
<i class="fa fa-pagelines"></i>
<i class="fa fa-diamond"></i>
<i class="fa fa-frown-o"></i>
<i class="fa fa-smile-o"></i>
<i class="fa fa-star"></i>
<i class="fa fa-pied-piper-alt"></i>
<i class="fa fa-heart"></i>
</div>
<div id="btnSetName">进入房间</div>
</div>
</div>
<form class="form" id="reg">
注册
<div id="youkeBtn111" class="formBtn btnBack">注册</div>
</form>
<form class="form" id="youke">
游客
</form>
<form class="form" id="forgetPassword">
忘记密码
</form>
</div>
<script type="text/javascript" src="js/map3.js"></script>
</body>
</html>