Repository navigation
Expand file tree
/
Copy pathMemoryMagic.css
More file actions
96 lines (84 loc) · 1.87 KB
/
Copy pathMemoryMagic.css
File metadata and controls
96 lines (84 loc) · 1.87 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
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@100;200;300;400;500;600;700;800&display=swap');
body {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Raleway', sans-serif;
background-color: #121212;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
.memory-magic {
max-width: 860px;
margin: 0 auto;
padding: 20px;
text-align: center;
background-color: #6b10e1;
color: #fff;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.memory-magic h1 {
font-size: 2.5rem;
margin-bottom: 20px;
font-weight: 600;
}
.memory-magic button {
background: none;
border: 2px solid #fff;
padding: 8px 16px;
border-radius: 4px;
color: #e51111;
font-weight: bold;
cursor: pointer;
font-size: 1em;
margin-bottom: 20px;
transition: background 0.3s ease, color 0.3s ease;
}
.memory-magic button:hover {
background: #c23866;
color: #fff;
}
.card-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
justify-content: center;
margin: 0 auto;
grid-template-rows: repeat(3, 1fr); /* Adjusted for 3 rows */
}
.card {
width: 120px;
height: 120px;
perspective: 1000px;
}
.inner-card {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: transform 0.5s;
}
.card.flipped .inner-card {
transform: rotateY(180deg);
}
.card img {
width: 100%;
height: 100%;
position: absolute;
backface-visibility: hidden;
border-radius: 8px;
}
.card .front {
background-color: #000; /* Black background for the front */
transform: rotateY(0deg);
z-index: 1; /* Ensure the front is on top */
}
.card .back {
transform: rotateY(180deg);
z-index: 0; /* Ensure the back is behind */
}