-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyles.css
142 lines (126 loc) · 2.66 KB
/
styles.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
* {
padding: 0px;
margin: 0px;
}
.body {
background: green;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.box {
position: absolute;
top: 25px;
right: 75px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #f2f2f2;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
padding: 20px;
width: 300px;
}
#scorebox {
font-size: 30px;
font-weight: bold;
margin-bottom: 20px;
}
#highscorebox {
font-size: 20px;
}
#board {
background: url("images/Wiki-background.png");
width: 90vmin;
height: 92vmin;
border: 5px solid black;
display: grid;
grid-template-rows: repeat(18, 1fr);
grid-template-columns: repeat(18, 1fr);
}
.head {
background: linear-gradient(blue, black);
border: 2px solid navy;
transform: scale(1.02);
border-radius: 5px;
}
.food {
background: linear-gradient(red, orange);
border: .25vmin solid black;
border-radius: 10px;
text-align: center;
color: white;
font-size: 2rem;
}
.snake {
background-color: black;
border: .25vmin solid whitesmoke;
border-radius: 5px;
position: relative;
color: white;
text-align: center;
font-size: 1.5rem;
}
.snake::after {
content: attr(data-number);
font-size: 0.8rem;
color: white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* Media queries for different screen sizes */
@media only screen and (max-width: 768px) {
/* Styles for small screens */
#scorebox {
right: 20px;
font-size: 20px;
}
#highscorebox {
right: 10px;
font-size: 20px;
}
.snake {
font-size: 1rem;
}
.food{
font-size: 1rem;
}
}
@media only screen and (min-width: 769px) and (max-width: 1024px) {
/* Styles for medium screens */
#scorebox {
right: 100px;
font-size: 30px;
}
#highscorebox {
right: 80px;
font-size: 30px;
}
.snake {
font-size: 1.5rem;
}
.food{
font-size: 1.5rem;
}
}
@media only screen and (min-width: 1025px) {
/* Styles for large screens */
#scorebox {
right: 200px;
font-size: 40px;
}
#highscorebox {
right: 140px;
font-size: 40px;
}
.snake {
font-size: 2rem;
}
.food{
font-size: 2rem;
}
}