-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (71 loc) · 3.26 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Sliding Puzzle</title>
<style>
* { margin: 0; padding: 0}
html, body { font-family: 'Roboto Condensed', sans-serif; font-weight: 700; background: #000; overflow: hidden;}
#puzzle { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -40%); width: 320px; height: 320px; display: block; touch-action: none}
.cell { transition: all 0.2s linear; transition-timing-function: ease; position: absolute; width: 32.6%; height: 32.6%; margin: 1px; text-align: center; color: #083d77; font-size: 24px; font-family: 'Oswald', sans-serif; font-weight: 200; }
.empty { }
.cell-0-0 { top:0 ; left: 0; }
.cell-0-1 { top:0; left: 33%; }
.cell-0-2 { top:0 ; left: 66%; }
.cell-1-0 { top:33% ; left: 0; }
.cell-1-1 { top:33% ; left: 33%; }
.cell-1-2 { top:33% ; left: 66%; }
.cell-2-0 { top:66% ; left: 0; }
.cell-2-1 { top:66% ; left: 33%; }
.cell-2-2 { top:66% ; left: 66%; }
.play { position: fixed; z-index: 2; top: 0; width: 100%; height: auto; }
#low-txt { font-size: 54px; color: #fff; display: block; margin: 25px auto; text-align: center;}
.you-win {width: 100%; height: 100%; display:flex; justify-content: center; text-align: center; align-items: center; color:#000000; display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -25%);}
#crab-test { text-shadow: 10px 10px 0 rgba(0,0,0,1); font-size: 130px; text-align: center; margin: 30% auto; display: block}
@media (min-width: 1281px) { h1 {margin: 20% auto; font-size: 130px; text-align: center; }}
@media (min-width: 1025px) and (max-width: 1280px) { h1 {margin: 20% auto; font-size: 130px; text-align: center; } }
@media (min-width: 320px) and (max-width: 480px) { h1 {margin: 20% auto; text-align: center; font-size: 49px}}
@media (min-width: 481px) and (max-width: 767px) { h1 {margin: 20% auto; text-align: center; font-size: 49px}}
</style>
</head>
<body>
<div class="play">
<h1 id="low-txt">LOW GAME</h1>
</div>
<main id="puzzle-container">
<div id="puzzle">
<div class="cell cell-0-0" id="1" data-index="1">
<img src="assets/0.png"/>
</div>
<div class="cell cell-0-1" id="2" data-index="2">
<img src="assets/1.png"/>
</div>
<div class="cell cell-0-2" id="3" data-index="3">
<img src="assets/2.png"/>
</div>
<div class="cell cell-1-0" id="4" data-index="4">
<img src="assets/3.png"/>
</div>
<div class="cell cell-1-2" id="5" data-index="5">
<img src="assets/4.png"/>
</div>
<div class="cell cell-2-2" id="6" data-index="6">
<img src="assets/5.png"/>
</div>
<div class="cell cell-2-0" id="7" data-index="7">
<img src="assets/6.png"/>
</div>
<div class="cell cell-1-1" id="8" data-index="8">
<img src="assets/7.png"/>
</div>
<div style="background: Transparent" class="cell cell-2-1" id="0" data-index="0"></div>
</div>
</main>
<div class="you-win">
<h1 id="crab-text" contenteditable>🦀YOU<br> WIN!🦀</h1>
</div>
<script src="index.js"></script>
</body>
</html>