-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
151 lines (136 loc) · 2.76 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
<!DOCTYPE html>
<html lang="EN">
<head>
<title>Snakes and Ladders</title>
<style type="text/css">
html {
background-color: #eed;
box-sizing: border-box;
color: #777;
font-family: sans-serif;
font-size: 64.5%;
}
.w {
font-size: 1.5rem;
height: 500px;
margin: 0 auto;
width: 500px;
}
canvas {
border: 5px solid grey;
height: 500px;
width: 500px;
background-image: linear-gradient(45deg, #ab9574 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ab9574 75%), linear-gradient(45deg, transparent 75%, #ab9574 75%), linear-gradient(45deg, #ab9574 25%, transparent 25%);
background-size: 100px 100px;
background-position: 0 0, 0 0, -50px -50px, 50px 50px;
}
.pHuman .wrapper {
color: rgba(87, 75, 0, 0.8666666667);
}
.pHuman canvas {
border-color: #fd0d;
}
.pHuman #dT {
background-color: #fd0d;
background-blend-mode: multiply;
border-color: rgba(163, 141, 0, 0.8666666667);
}
.pHuman #msg {
color: #d44;
}
.pBot .wrapper {
color: rgba(0, 31, 66, 0.8666666667);
}
.pBot canvas {
border-color: #0057b7dd;
}
.pBot #dT {
background-color: #0057b7dd;
background-blend-mode: multiply;
border-color: rgba(0, 51, 107, 0.8666666667);
}
.pBot #msg {
color: #777;
}
#bg {
height: 300px;
width: 300px;
background-repeat: no-repeat;
}
#dT {
background-size: 50px 300px;
border: 2px solid black;
border-radius: 7px;
cursor: pointer;
display: inline-block;
height: 50px;
width: 50px;
}
#dT.s6 {
background-position: 0 0;
}
#dT.s5 {
background-position: 0 -50px;
}
#dT.s4 {
background-position: 0 -100px;
}
#dT.s3 {
background-position: 0 -150px;
}
#dT.s2 {
background-position: 0 -200px;
}
#dT.s1 {
background-position: 0 -250px;
}
.bW {
display: flex;
margin: 15px 65px;
}
button {
border-radius: 7px;
cursor: pointer;
margin-left: 100px;
padding: 10px 30px;
}
.h {
display: none;
}
h1 {
margin-bottom: 12px;
}
h2 {
margin-bottom: 5px;
margin-top: 0;
}
#pN {
color: #111;
}
.p {
animation: do-p 2s infinite;
}
@keyframes do-p {
0% {
box-shadow: 0 0 0 0px rgba(150, 100, 0, 0.6);
}
100% {
box-shadow: 0 0 0 15px rgba(0, 0, 0, 0);
}
}
</style>
</head>
<body>
<div class="w">
<h1>Snakes & Ladders</h1>
<h2>Player: <span id="pN"></span></h2>
<h2 id="msg">...</h2>
<div class="bW">
<div id="dT" class="s5 p"></div>
<button type="button" id="r" class="h">Play Again?</button>
</div>
<canvas></canvas>
</div>
<script src="js.min.js"></script>
</body>
</html>