-
Notifications
You must be signed in to change notification settings - Fork 1
/
style.css
96 lines (82 loc) · 1.62 KB
/
style.css
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
#c2d {
height: 100vh;
aspect-ratio: 160 / 144;
position: absolute;
image-rendering: pixelated; /* You definitely want this if you are doing pixel art */
background-color: black;
}
/* Get rid of any margins, set background black, use flexbox to center */
html, body {
margin: 0;
background-color: #111;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
user-select: none;
}
@media (max-width: 900px) {
body {
background: #f7cebd;
}
#gamepad {
position: fixed;
top: 0;
left: 0;
height: 100vh;
width: 100vw;
}
b {
position: absolute;
display: inline-flex;
border: 2px solid;
border-radius: 7vmax;
height: 7vmax;
width: 7vmax;
font-size: 3vmax;
color: #b85930;
justify-content: center;
align-items: center;
font-family: monospace;
transition: all 50ms ease-in-out;
}
b:active {
color: #f7cebd;
transform: scale(1.2);
}
#up, #down {
left: 8vmax;
bottom: 20vmax;
}
#down {
bottom: 7vmax;
}
#left, #right {
left: 1.5vmax;
bottom: 13.5vmax;
}
#right {
left: 14.5vmax;
}
#ok {
right: 8vmax;
bottom: 13.5vmax;
}
}
@media (orientation: portrait) {
body {
align-items: flex-start;
padding-top: 20vh;
}
#gamepad {
top: -10vw;
left: 4vw;
}
#c2d {
height: auto;
width: 100vw;
}
#ok {
right: 7vmax;
}
}