-
Notifications
You must be signed in to change notification settings - Fork 1
/
style.css
128 lines (104 loc) · 1.82 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
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
html {
box-sizing: border-box;
margin: 0;
}
body {
margin: 0;
padding: 0;
background-color: #267f4d;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.wrapper {
position: relative;
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.fields {
width: 700px;
height: 710px;
overflow: hidden;
}
.fields > div {
margin-bottom: 1px;
margin-right: 1px;
float: left;
border: 1px solid black;
border-radius: 3px;
box-sizing: border-box;
}
.game-over-container {
width: 100vw;
height: 100vh;
position: absolute;
transition: opacity 0.5s;
}
.overlay {
position: absolute;
width: 100%;
height: 100%;
background: #09450b;
opacity: 0.85;
}
.score-container {
margin-top: 10px;
color: white;
font-size: 40px;
}
.game-over-content {
position: absolute;
left: 42%;
top: 42%;
z-index: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.game-over-content span {
color: white;
font-size: 40px;
line-height: 40px;
}
.btn-container {
display: flex;
justify-content: center;
margin-top: 13px;
}
.btn-container > button {
padding: 10px;
font-size: 30px;
background-color: rgba(13, 145, 19, 1);
color: white;
border-radius: 10px;
border-style: none;
cursor: pointer;
font-family: inherit;
}
.btn-container > button:hover {
background-color: rgba(13, 145, 19, 0.6);
}
.btn-container > button:active {
background-color: rgba(13, 145, 19, 0.4);
}
.hidden-container {
opacity: 0;
}
.hidden-content {
display: none;
}
[data-game='fruit'] {
background-color: red;
}
[data-game='snake'] {
background-color: goldenrod;
}
[data-game='snake--head'] {
background-color: green;
}
[data-game='wall'] {
background-color: blue;
}