forked from jennieohyoung-enterprise/tic-tac-toe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
127 lines (106 loc) · 1.57 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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, Helvetica, sans-serif;
}
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #eee;
}
h1 {
font-size: 5rem;
margin-bottom: 0.5em;
}
h2 {
margin-top: 1em;
font-size: 2rem;
margin-bottom: 0.5em;
}
.play-area {
display: grid;
width: 300px;
height: 300px;
grid-template-columns: auto auto auto;
}
.block {
display: flex;
width: 100px;
height: 100px;
align-items: center;
justify-content: center;
font-size: 3rem;
font-weight: bold;
border: 3px solid black;
transition: background 0.2s ease-in-out;
}
.block:hover {
cursor: pointer;
background: #0ff30f;
}
.occupied:hover {
background: #ff3a3a;
}
.win {
background: #0ff30f;
}
.win:hover {
background: #0ff30f;
}
#block_0,
#block_1,
#block_2 {
border-top: none;
}
#block_0,
#block_3,
#block_6 {
border-left: none;
}
#block_6,
#block_7,
#block_8 {
border-bottom: none;
}
#block_2,
#block_5,
#block_8 {
border-right: none;
}
button {
outline: none;
border: 4px solid green;
padding: 10px 20px;
font-size: 1rem;
font-weight: bold;
background: none;
transition: all 0.2s ease-in-out;
}
button:hover {
cursor: pointer;
background: green;
color: white;
}
.playerWin {
color: green;
}
.computerWin {
color: red;
}
.draw {
color: orangered;
}
@media only screen and (max-width: 600px) {
h1 {
font-size: 3rem;
margin-bottom: 0.5em;
}
h2 {
margin-top: 1em;
font-size: 1.3rem;
}
}