Repository navigation
Expand file tree
/
Copy pathconnect4.css
More file actions
92 lines (79 loc) · 1.51 KB
/
Copy pathconnect4.css
File metadata and controls
92 lines (79 loc) · 1.51 KB
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
/* used off white color for background */
body {
background-color: #e9e9e9;
text-align: center;
}
/* div of all elements */
#game {
text-align: center;
display: inline-block;
}
/* title of game font */
h1 {
font-family: 'Josefin Sans', sans-serif;
color: blue;
}
/* change the 4 in title to make the color similar to game */
#number4 {
color: red;
}
/* title of current player's turn */
#playerTurn {
text-align: center;
font-family: 'Josefin Sans', sans-serif;
color: red;
}
#playerTurn #player1 {
text-align: center;
font-family: 'Josefin Sans', sans-serif;
color: red;
}
#playerTurn #player2 {
text-align: center;
font-family: 'Josefin Sans', sans-serif;
color: blue;
}
/* game board table */
#board td {
width: 50px;
height: 50px;
border: solid 1px #666;
position: relative;
}
/* animation for dropping the player's piece */
@keyframes dropping-piece {
from {
top: -200px;
}
to {
top: 0px;
}
}
/* pieces are div within game table cells: draw as colored circles */
.piece {
margin: 5px;
width: 80%;
height: 80%;
border-radius: 50%;
animation-name: dropping-piece;
animation-duration: 1s;
animation-direction: normal;
animation-fill-mode: both;
position: absolute;
}
/* make pieces red/blue, depending on player 1/2 piece */
.piece.p1 {
background-color: red;
color: red;
}
.piece.p2 {
background-color: blue;
color: blue;
}
/* column-top is table row of clickable areas for each column */
#column-top td {
border: dashed 1px lightgray;
}
#column-top td:hover {
background-color: gold;
}