Skip to content

Commit 3a57576

Browse files
committed
css
1 parent 319dbd5 commit 3a57576

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

tic-tac-toe.css

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
body {
2-
background-color: #86469C;
2+
background-color: #fad2e1;
33
margin: 0%;
44
padding: 0%;
55
height: 100vh;
66
text-align: center;
77
transition: background-color 0.5s ease, color 0.5s ease;
8-
color: black;
8+
color: #fff;
99
}
1010

1111
.dark {
12-
background-color: #0B2545;
12+
background-color: #fff;
1313
}
1414

1515
.dark #header {
16-
background-color: #8DA9C4;
16+
background-color: #b4cded;
17+
color: black;
1718
}
1819

19-
.dark #box {
20+
/* .dark #box {
2021
background-color: #EEF4ED;
21-
}
22+
} */
2223

2324
.dark .sbox {
24-
background-color: #134074;
25-
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5);
25+
background-color: #b4cded;
26+
color: black;
27+
/* box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5); */
2628
}
2729
.dark #rb{
2830
background-color: #134074;
29-
box-shadow: 0 0 1rem rgba(255, 255, 255, 0.5);
31+
color: #fff;
32+
font-weight: 600;
33+
border-radius: 3px;
3034
}
3135
.dark #msg{
32-
color: azure;
36+
color: black;
3337
}
3438

3539
#c_btw {
@@ -53,7 +57,8 @@ body {
5357
}
5458

5559
#header {
56-
background-color: #BC7FCD;
60+
background-color: #240046;
61+
color: #fff;
5762
display: flex;
5863
justify-content: space-between;
5964
align-items: center;
@@ -68,15 +73,14 @@ h1 {
6873

6974
#con {
7075
margin: 1rem auto;
71-
height: 70vh;
76+
height: 65vh;
7277
width: 70vh;
7378
display: flex;
7479
justify-content: center;
7580
align-items: center;
7681
}
7782

7883
#box {
79-
background-color: #FFCDEA;
8084
height: 60vmin;
8185
width: 60vmin;
8286
display: flex;
@@ -87,23 +91,24 @@ h1 {
8791
}
8892

8993
.sbox {
90-
background-color: #FB9AD1;
94+
background-color: #240046;
95+
color: #fff;
9196
font-size: 8vmin;
9297
height: 16vmin;
9398
width: 16vmin;
9499
border-radius: 1rem;
95100
border: 0;
96-
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5);
97-
color: black;
101+
box-shadow: 0 0 1rem rgba(168, 161, 161, 0.637);
98102
}
99103

100104
#rb {
101-
background-color: #FB9AD1;
105+
background-color: #832161;
106+
color: azure;
107+
font-weight: 600;
102108
padding: 1rem;
103-
font-size: 1.5vmin;
104-
border-radius: 1rem;
109+
font-size: 2vmin;
110+
border-radius: 3px;
105111
border: 0;
106-
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5);
107112
}
108113

109114
#msg {
@@ -115,6 +120,7 @@ h1 {
115120
display: flex;
116121
justify-content: center;
117122
align-items: center;
123+
margin-top: 2rem;
118124
}
119125

120126
.hide {

tic-tac-toe.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ const res = () => {
2626

2727
reset.addEventListener("click", res);
2828

29+
const draw =()=>{
30+
msg.innerText ="Oops ! -_- It is tie";
31+
mc.classList.remove("hide");
32+
disablebox();
33+
};
34+
2935
const showW = (win) => {
3036
for (let b of moves) {
3137
b.disabled = true;
3238
}
33-
msg.innerText = `Congratulation, Winner is ${win}`;
39+
msg.innerText = `Congratulation !!!...Winner is ${win}`;
3440
msgcon.classList.remove("hide");
3541
}
3642

0 commit comments

Comments
 (0)