-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
143 lines (125 loc) · 2.65 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
height: 100vh;
width: 100vw;
background-color: rgb(54, 44, 42);
}
.board {
display: grid;
width: 100%;
height: 100%;
display: grid;
justify-content: center;
align-content: center;
justify-items: center;
align-items: center;
grid-template-columns: repeat(3, auto);
}
/* DEFINE A COR DO HOVER */
.board.x .cell:not(.x):not(.circle):hover::after,
.board.x .cell:not(.x):not(.circle):hover::before,
.board.circle .cell:not(.x):not(.circle):hover::after,
.board.circle .cell:not(.x):not(.circle):hover::before {
background: rgb(240, 128, 128) !important;
}
.cell {
width: 100px;
height: 100px;
border: 2px solid beige;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.cell:nth-child(1),
.cell:nth-child(2),
.cell:nth-child(3){
border-top: none;
}
.cell:nth-child(1),
.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,
.cell.circle {
cursor: not-allowed;
}
/* X */
.cell.x::before,
.cell.x::after,
.board.x .cell:not(.x):not(.circle):hover::after,
.board.x .cell:not(.x):not(.circle):hover::before {
content: "";
height: calc(100px * 0.15);
width: calc(100px * 0.9);
background: beige;
position: absolute;
}
.cell.x::before,
.board.x .cell:not(.x):not(.circle):hover::before {
transform: rotate(45deg);
}
.cell.x::after,
.board.x .cell:not(.x):not(.circle):hover::after {
transform: rotate(-45deg);
}
/* CIRCLE */
.cell.circle::before,
.cell.circle::after,
.board.circle .cell:not(.x):not(.circle):hover::after,
.board.circle .cell:not(.x):not(.circle):hover::before {
content: "";
height: calc(100px * 0.9);
width: calc(100px * 0.9);
background: beige;
position: absolute;
border-radius: 50%;
}
.winning-message {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.4);
flex-direction: column;
}
.winning-message-button {
font-size: 2.5rem;
background-color: rgba(65, 185, 131, 1);
padding: 10px 15px;
cursor: pointer;
border-radius: 5px;
border: none;
margin-top: 350px;
color: white;
}
.winning-message-button:hover {
color: black;
background-color: beige;
}
.winning-message-text {
color: white;
font-size: 5rem;
}
.show-winning-message {
display: flex;
}