-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory.css
More file actions
161 lines (154 loc) · 2.99 KB
/
memory.css
File metadata and controls
161 lines (154 loc) · 2.99 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
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
/* page layout */
body {
padding: 0;
text-align: center;
background-image: url(images/background.jpg);
background-size: cover;
background-color: #d0e2ec;
}
.content {
width: 1100px;
height: 100vh;
margin: 0 auto;
padding: 0;
}
/* header, logo and memory heading */
header {
width: 280px;
height: 600px;
margin: 0 3em;
padding: 1em;
float: left;
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid gray;
border-radius: 5px;
}
header figure img {
width: 100%;
}
header h1 {
font-family: Geneva, Helvetica, sans-serif;
color: #2a363b;
margin-top: 0;
}
/* Rules div */
.rules {
margin: 1em 2.5em;
padding: 1em 1em 0.5em;
}
.rulesHeading {
font-family: Geneva, Helvetica, sans-serif;
color: #2a363b;
font-size: 1em;
font-weight: lighter;
border-radius: 3px;
padding: 0.3em;
margin-top: 2em;
background-color: #6ec9ed;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
transition-duration: 0.4s;
}
.rulesText {
font-size: 0.8em;
text-align: left;
visibility: hidden;
opacity: 0;
transition: visibility .5s, opacity .5s ease-in-out;
}
.rules:hover > .rulesText {
visibility: visible;
opacity: 1;
}
.rules:hover > .rulesHeading {
background-color: #029cde;
margin-top: 0;
}
/* Play again button */
.playButton {
font-family: Geneva, Helvetica, sans-serif;
font-size: 1.1em;
height: 70px;
width: 70px;
background-color: #6ec9ed;
margin: 0.5em;
border-radius: 35px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
transition-duration: 0.4s;
}
.playButton:hover {
cursor: pointer;
background-color: #029cde;
}
/* memory board */
.memoryboard {
width: 600px;
height: 600px;
background-color: rgba(255, 255, 255, 0.8);
padding: 1em;
margin: 2em 3em;
border: 1px gray solid;
border-radius: 5px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
/* memory cards, back and front */
.backofcard, .front {
height: 100px;
width: 100px;
margin: 1em;
border: 2px solid gray;
border-radius: 3px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
background-image: url(images/paw_pattern.jpg);
background-color: #c41e10;
}
.backofcard {
transform: rotateY(0deg);
transition: 0.5s linear;
}
.backofcard:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.backofcard img {
width: 100%;
opacity: 0;
transition: opacity 0.3s ease-out;
transition-delay: 0.1s;
}
.front {
transform: rotateY(180deg);
transition: 0.5s linear;
}
.front img {
width: 100%;
padding: 0;
margin: 0;
border-radius: 2px;
opacity: 1;
transition: opacity 0.3s ease-in;
transition-delay: 0.2s;
}
/* set border colors to cards when comparing them */
#greenBorder {
border: 2px solid #93bd41;
}
#redBorder {
border: 2px solid #c41e10;
}
/* finish star */
@keyframes fadein {
from {opacity: 0;}
to {opacity: 1;}
}
.star {
postion: absolute;
z-index: 1;
width: 300px;
height: 300px;
background-image: url(images/star.png);
margin: -27em 0 0;
padding: 0;
animation-name: fadein;
animation-duration: 2s;
}