-
Notifications
You must be signed in to change notification settings - Fork 0
/
2048.html
59 lines (52 loc) · 2.33 KB
/
2048.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>2048</title>
<style type="text/css">
header{ width: 100%; margin:0 auto; text-align: center; }
header h1{font:bold 40px/15px Arial;}
header a{display: block;margin:auto;width: 100px;padding:8px 5px;
background-color: #8f7a66; font-family:Arial;color:white;
border-radius:10px;cursor: pointer;
text-decoration: none;}
header a:hover{text-shadow: 0 0 2px #333;}
header p{font: bold 18px/5px Arial;}
.grid-container{position: relative;margin:auto;background-color: #bbada0;}
.grid-container .grid-cell{position: absolute;
background-color: #d4c8bb;border-radius: 6px;}
.number-cell{border-radius: 6px;font-family: Arial;font-weight:bold;
text-align:center;position:absolute;}
</style>
</head>
<body>
<header>
<h1>2048</h1>
<a href="javascript:newgame();" id="newgamebutton">new game</a>
<p href="#">score:<span id="score">0</span></p>
</header>
<div id="grid-container" class="grid-container">
<div class="grid-cell" id="grid-cell-0-0"></div>
<div class="grid-cell" id="grid-cell-0-1"></div>
<div class="grid-cell" id="grid-cell-0-2"></div>
<div class="grid-cell" id="grid-cell-0-3"></div>
<div class="grid-cell" id="grid-cell-1-0"></div>
<div class="grid-cell" id="grid-cell-1-1"></div>
<div class="grid-cell" id="grid-cell-1-2"></div>
<div class="grid-cell" id="grid-cell-1-3"></div>
<div class="grid-cell" id="grid-cell-2-0"></div>
<div class="grid-cell" id="grid-cell-2-1"></div>
<div class="grid-cell" id="grid-cell-2-2"></div>
<div class="grid-cell" id="grid-cell-2-3"></div>
<div class="grid-cell" id="grid-cell-3-0"></div>
<div class="grid-cell" id="grid-cell-3-1"></div>
<div class="grid-cell" id="grid-cell-3-2"></div>
<div class="grid-cell" id="grid-cell-3-3"></div>
</div>
<script type="text/javascript" src="js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="js/support2048.js"></script>
<script type="text/javascript" src="js/showanimation2048.js"></script>
<script type="text/javascript" src="js/main2048.js"></script>
</body>
</html>