-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
253 lines (235 loc) · 7.78 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>2048 by a6051529</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">2048</h1>
<h2 class="project-tagline">html5版的2048游戏,模仿原生体验</h2>
<a href="https://github.com/a6051529/2048" class="btn">View on GitHub</a>
<a href="https://github.com/a6051529/2048/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/a6051529/2048/tarball/master" class="btn">Download .tar.gz</a>
</section>
<section class="main-content">
<p><!doctype html>
</p>
<p></p>
2048
html{
font-family: Arial,&#39;微软雅黑&#39;,sans-serif;
font-size: 100px;
}
button{
font-family: Arial,&#39;微软雅黑&#39;,sans-serif;
}
html,body{
height: 100%;
margin: 0;
padding: 0;<br>
overflow: hidden;
}
body{
padding: 10px 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: &quot; &quot;;
clear: both;
height: 0;
}
.cb{ clear: both;}
html .clearfix { <em>zoom: 1; } /</em>IE6 IE7 <em>/
.a-bouncein{
-webkit-animation:0.1s ease-out backwards;
animation:0.1s ease-out backwards;
-webkit-animation-delay: 0.05s;
animation-delay: 0.05s;
-webkit-animation-name:bouncein;
animation-name:bouncein;
}
/</em> 弹入 */
@-webkit-keyframes bouncein{
0%{-webkit-transform:scale(1);}
50%{-webkit-transform:scale(1.05);}
70%{-webkit-transform:scale(0.9);}
100%{-webkit-transform:scale(1);}
}
@keyframes bouncein{
0%{transform:scale(1);}
50%{transform:scale(1.05);}
70%{transform:scale(0.9);}
100%{transform:scale(1);}
}<br>
.fl {float: left;}
.game-ul {
padding: 0;
position: relative;<br>
background: url(lib/bg.png) center center;
-webkit-background-size: 100%;
background-size: 100%;
list-style-type: none;
margin: 0 auto;
}
.game-li {
display: table;
margin: 1.219512195122%;
width: 21.951219512195%;
height: 21.951219512195%;
font: bold 0.8rem Arial, &#39;微软雅黑&#39;, &#39;宋体&#39;, sans-serif;
text-align: center;
position: absolute;
z-index: 2;
color: #7c736a;
overflow: hidden;
-webkit-transform: scale(0);
transform: scale(0);
-webkit-transition: all 0.18s ease 0s;
transition: all 0.18s ease 0s;
}
.game-li span{
display: table-cell;
line-height: 1;
vertical-align: middle;
}
.game-li.show{
-webkit-transform: scale(1);
transform: scale(1);<br>
}<br>
.li2 { color: #776e65;background: #eee4da;}
.li4 { color: #776e65;background: #ece0c8;}
.li8 { color: #fff;background: #f2b179;}
.li16 {color: #fff; background: #ec8d54;}
.li32 {color: #fff;background: #f67c5f;}
.li64 { color: #fff;background: #f65d3b;}
.li128 { color: #fff;background: #f3d86b;}
.li256 { color: #fff;background: #edcc61;}
.li512 { color: #fff;background: #e4c02a;}
.li1024 {color: #fff;font-size: 0.6rem;background: #e2ba13;}
.li2048 {color: #fff;font-size: 0.6rem;background: #ecc400;}
.li4096 {color: #fff;font-size: 0.6rem;background: #5fda93;}
.li16384 {color: #fff;font-size: 0.5rem;}
.fl{float: left;}
.fr{float: right;}
.dib{display: inline-block;}
.vm{vertical-align: middle;}
header{
height: 150px;
padding-bottom: 10px;
margin: 0 auto;
}
.game-title{
border-radius: 6px;
width: 150px;
height: 150px;
font-size: 0.5rem;
font-weight: bold;
text-align: center;
color: #fff;
background: #ecc400;
display: table;
}
.game-title span{
display: table-cell;
vertical-align: middle;<br>
}
.game-score{
position: relative;
height: 100%;
vertical-align: top;
width: 425px;
}
.game-score-div{
height: 70%;
}
.score-wrap{
vertical-align: top;
text-align: center;
border-radius: 6px;
width: 46.5%;
height: 100%;
background: #bbada0;
}
.game-score p{
margin: 0;
height: 50%;
font-weight: bold;
line-height: 1;
color: #eee4d5;
font-size: 0.24rem;
}
.game-score h3{
line-height: 1;
color: #fff;
margin: 0;
height: 50%;
font-weight: bold;
font-size: 0.4rem;
}
.restart-div{
height: 25%;
width: 100%;
position: absolute;
bottom: 0;
}
.restart{
display: block;
width: 100%;
border: none;
height: 100%;
font-size: 0.2rem;
background: #ed995b;
border-radius: 6px;
text-align: center;
color: #fff;
cursor: pointer;<br>
}
<p></p>
<div>2048</div>
<div>
<div>
<div>
<p>分数</p>
<h3>
<a id="0" class="anchor" href="#0" aria-hidden="true"><span class="octicon octicon-link"></span></a>0</h3>
<br>
</div>
<div>
<p>历史最高成绩</p>
<h3>
<a id="0-1" class="anchor" href="#0-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>0</h3>
</div>
</div>
<div>
重新开始
</div>
</div>
<ul>
</ul>
<pre><code><script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="lib/game.js"></script>
<script>
$(function () {
game2048.init('body');
});
</script>
</code></pre>
<p>
</p>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/a6051529/2048">2048</a> is maintained by <a href="https://github.com/a6051529">a6051529</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
</body>
</html>