-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
107 lines (95 loc) · 1.99 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
body {
font-family: 'Arial', sans-serif;
text-align: center;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
}
.title {
color: #333;
font-size: 36px;
margin-bottom: 20px;
}
.board {
display: grid;
grid-template-columns: repeat(3, 100px);
grid-gap: 10px;
margin: 20px auto; /* Center horizontally within the container */
justify-content: center; /* Center horizontally within the container */
align-items: center; /* Center vertically within the container */
}
.cell {
width: 100px;
height: 100px;
font-size: 36px;
text-align: center;
border: none;
cursor: pointer;
background-color: #f4f4f4;
color: #333;
transition: background-color 0.3s, transform 0.2s;
animation-duration: 0.5s;
animation-name: none;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center; /* Center X and O boxes vertically */
}
.cell.winner {
animation-name: winningAnimation;
animation-iteration-count: infinite;
}
@keyframes winningAnimation {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
.cell:hover {
background-color: #ddd;
}
.message {
font-size: 24px;
margin: 20px 0;
color: #333;
}
.scoreboard {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
}
.score {
margin: 0 20px;
font-size: 24px;
font-weight: bold;
color: #333;
}
.reset-button {
background-color: #e74c3c;
color: #fff;
padding: 10px 20px;
font-size: 18px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
.reset-button:hover {
background-color: #c0392b;
}