-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
81 lines (70 loc) · 1.22 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
.grid-container {
width: 100vw;
height: 100vh;
display: grid;
grid-template-columns: auto auto auto;
justify-content: center;
align-content: center;
}
.cell {
width: 100px;
height: 100px;
border: 1px solid black;
font-size: 100px;
display: flex;
justify-content: center;
}
.cell:first-child,
.cell:nth-child(2),
.cell:nth-child(3)
{
border-top: none;
}
.cell:first-child,
.cell:nth-child(4),
.cell:nth-child(7)
{
border-left: none;
}
.cell:nth-child(3),
.cell:nth-child(6),
.cell:nth-child(9)
{
border-right: none;
}
.cell:nth-child(7),
.cell:nth-child(8),
.cell:nth-child(9)
{
border-bottom: none;
}
.cell.x::before {
content: 'X';
}
.cell.o::before {
content: 'O';
}
.grid-container.x .cell:not(.x):not(.o):hover::before {
color: lightgray;
content: 'X';
}
.grid-container.o .cell:not(.x):not(.o):hover::before {
color: lightgray;
content: 'O';
}
.winning-message {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.9);
justify-content: center;
align-items: center;
color: white;
font-size: 3rem;
}
.winning-message.show {
display: flex;
}