-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
162 lines (144 loc) · 3.28 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/* Reset default margin and padding for all elements */
* {
margin: 0;
padding: 0;
}
/* Body styling */
body {
background-color: #e32047; /* Set background color */
text-align: center; /* Center-align text */
}
/* Main game container styling */
.main {
height: 70vh; /* Set height of the main game container */
display: flex;
justify-content: center;
align-items: center;
}
/* Game board container styling */
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin: 20px;
height: 60vh; /* Set height of the game board container */
width: 60vh; /* Set width of the game board container */
background-color: black; /* Set background color */
border-radius: 20px; /* Set border radius */
margin-top: 50px;
}
/* Individual game cell styling */
.box {
height: 18vh; /* Set height of individual game cell */
width: 18vh; /* Set width of individual game cell */
margin: 6px;
border-radius: 15px;
border: 2px solid black; /* Set border style and color */
background-color: white; /* Set background color */
font-size: 3.5em;
color: black;
transition: transform 0.5s ease; /* Add transition effect */
}
/* Styling for clicked game cell */
.box.clicked {
transform: rotateY(180deg); /* Add a rotation effect for clicked cells */
}
/* Header styling */
h1 {
margin-top: 10px;
margin-bottom: 25px;
color: yellow; /* Set text color */
font-style: bold;
font-family: sans-serif;
}
/* Play Again button styling */
.play-again {
background-color: yellow;
padding: 10px;
border: none;
border-radius: 15px;
width: 150px;
font-size: 20px;
}
/* Player switch styling */
.switch {
height: 30px;
margin-top: 20px;
margin-bottom: -10px;
}
/* Styling for player symbols (X and O) */
span {
border: 2px solid black;
padding: 10px;
display: inline-block;
width: 50px;
border: 2px solid white;
font-family: sans-serif;
font-size: 20px;
font-style: bold;
transition: 0.3s ease;
}
#one {
background-color: white;
margin-right: -5px;
}
/* Winner message styling */
#winner {
display: inline-block;
background-color: #007f5f;
color: #f2e8cf;
font-family: sans-serif;
font-weight: 700;
padding: 10px;
border: none;
border-radius: 15px;
width: 150px;
font-size: 20px;
margin-left: 30px;
}
/* New Game button styling */
#new-game {
background-color: yellow;
padding: 10px;
border: none;
border-radius: 15px;
width: 150px;
font-size: 20px;
margin-left: 30px;
}
/* Styling for the Play Again section */
.last {
display: flex;
justify-content: center;
}
/* Styling for hidden elements */
.hide {
display: none;
transition: 0.5s;
}
/* Hover effect for game cells */
.box:hover {
background-color: lightgray;
color: black;
transition: 0.5s ease;
}
/* Hover effect for buttons */
#new-game:hover,
#winner:hover,
.play-again:hover {
color: white;
background-color: black;
transition: 0.5s ease;
cursor: pointer;
}
/* Add this styling for player or AI selection */
.selection {
margin-bottom: 20px;
font-family: sans-serif;
color: white;
}
#playerType {
padding: 5px;
border-radius: 5px;
}