-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
111 lines (103 loc) · 1.94 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
*{
margin: 0;
box-sizing: border-box;
height: 100vh;
padding: 0;
}
:root{
--cell-size: 100px;
--mark-size: calc(var(--cell-size)*.9);
}
body{
display: flex;
justify-content: center;
align-items: center;
}
.gameboard{
display: flex;
flex-flow: column wrap;
justify-content: center;
height: 300px;
width: 300px;
}
.square{
height: var(--cell-size);
width: var(--cell-size);
border: 1px solid black;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.square:first-child,
.square:nth-child(4),
.square:nth-child(7) {
border-top: none;
}
.square:nth-child(2),
.square:nth-child(3),
.square:nth-child(1)
{
border-left:none;
}
.square:nth-child(3),
.square:nth-child(8),
.square:nth-child(6),
.square:nth-child(9)
{
border-bottom: none;
}
.square:nth-child(9),
.square:nth-child(8),
.square:nth-child(7){
border-right: none;
}
/* cross css */
.square.x::before,
.square.x::after{
position: absolute;
content: "";
height: var(--mark-size);
width: calc(var(--mark-size) * .15);
background-color: black;
}
.square.x::before
{
transform: rotate(45deg);
}
.square.x::after{
transform: rotate(-45deg);
}
/* circle css */
.square.circle{
background-color: aqua;
}
.square.circle::before,
.square.circle::after{
position: absolute;
content: "";
border-radius: 50%;
}
.square.circle::before{
background-color: black;
width: var(--mark-size);
height: var(--mark-size);
}
.square.circle::after{
background-color: white;
width: calc(var(--mark-size)* .7);
height: calc(var(--mark-size)* .7);
}
/* not allowed twice to click on same cell */
.square.circle,
.square.x{
cursor: not-allowed;
}
.reset{
width: 50px;
height: 50px;
}
.startgame{
width: 50px;
height: 50px;
}