-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
76 lines (67 loc) · 2.16 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
@import url('https://fonts.googleapis.com/css2?family=Wellfleet&display=swap');
*{
margin: 0;
padding: 0;
}
.body{
background: url(./img/BackGround.png);
min-height: 100vh;
background-size: 100vw 100vh;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
color:antiquewhite;
}
/*
The measuring unit used here is fr, which stands for "fractional unit". It's a flexible unit that distributes the available space in the grid container among the rows or columns according to their proportions. In this case, each row will take up an equal fraction of the available space.
Alternative values or parameters that can be passed to grid-template-rows include:
Lengths (e.g., px, em, rem): You can specify fixed lengths for rows, such as grid-template-rows: 100px 200px 50px;.
Percentages (%): You can specify row heights as percentages of the container's height, such as grid-template-rows: 20% 30% 50%;.
auto: This value automatically sizes rows based on their content.
min-content, max-content: These values size rows based on the minimum or maximum content size within them.
fr: Fractional units, as used in the example, distribute space evenly among rows/columns.
*/
#board{
background: linear-gradient(#191915, #181816);
opacity: 88%;
width: 90vmin;
height: 92vmin;
border: 2px solid black;
display: grid;
grid-template-rows: repeat(18, 1fr);
grid-template-columns: repeat(18, 1fr);
}
#scoreBox{
position: absolute;
top: 9px;
right: 200px;
font-size: 39px;
font-weight: bold;
font-family: "Wellfleet", monospace;
}
#hiscoreBox{
position: absolute;
top: 59px;
right: 140px;
font-size: 39px;
font-weight: bold;
font-family: "Wellfleet", monospace;
}
.head{
/* background-color: #DAA520; */
background: linear-gradient(#ea1a1a, #DAA520);
border: 2px solid rgb(34, 4, 34);
transform: scale(1.02);
border-radius: 20px;
}
.snake{
background-color: #efb216;
border: .25vmin solid white;
border-radius: 12px;
}
.food{
background: linear-gradient(red, purple);
border: .25vmin solid black;
border-radius: 8px;
}