-
Notifications
You must be signed in to change notification settings - Fork 0
/
connect4.css
118 lines (98 loc) · 1.73 KB
/
connect4.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
body {
background-color: black;
color: blue;
text-align: center;
font-family: Segoe UI;
margin: 0;
}
#game {
display: flex;
justify-content: center;
align-items: center;
}
table {
border-spacing: 5px;
margin: 0;
}
#board {
height: 50vw;
width: 50vw;
/* border: solid 2px blue; */
}
/* game board table */
#board td, th {
width: 50px;
height: 50px;
border: solid 2px blue;
}
td {
vertical-align: top;
}
/* column-top is table row of clickable areas for each column */
th {
border-style: dashed;
border-top-width: 1px;
}
/* pieces are div within game table cells: draw as colored circles */
.piece {
margin: 5px;
width: 80%;
height: 80%;
}
.p1 {
background-image: url(images/pacman.png);
background-size: contain;
background-repeat: no-repeat;
color: gold;
}
.p2 {
background-image: url(images/ghost.png);
background-size: contain;
background-repeat: no-repeat;
color: red;
}
#column-top.Pacman th:hover {
background: darkslateblue url(images/pacman.png) no-repeat center;
background-size: 70%;
}
#column-top.Ghost th:hover {
background: darkslateblue url(images/ghost.png) no-repeat center;
background-size: 70%;
}
aside {
margin: 0 5%;
padding: 2%;
font-weight: 650;
border: 2px solid blue;
height: 49vw;
width: 30vw;
box-sizing: border-box;
display: flex;
flex-flow: column;
justify-content: space-between;
}
h3 {
margin: 0;
}
#restart {
background-color: blue;
color: gold;
padding: 2%;
}
#restart:hover {
cursor: pointer;
}
#winBanner {
font-size: 4em;
position: fixed;
top: 20vw;
width: 100vw;
background-color: darkslateblue;
padding-bottom: 1%;
opacity: 0;
transition: 200ms;
}
#winBanner.visible {
opacity: 1;
transition: 500ms;
}