-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
68 lines (59 loc) · 1.21 KB
/
style.css
File metadata and controls
68 lines (59 loc) · 1.21 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
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
margin: 0;
}
h1 {
text-align: center;
font-size: 24px;
padding-right: 20px;
}
h4 {
padding-right: 20px;
}
.game-board {
display: grid;
grid-template-columns: repeat(4, 100px);
grid-template-rows: repeat(4, 100px);
gap: 10px;
}
.card {
width: 100px;
height: 100px;
background-color: #ddd;
display: flex;
align-items: center;
justify-content: center;
font-size: 2em;
cursor: pointer;
transition: transform 0.3s;
transform-style: preserve-3d;
position: relative;
}
.card.flipped {
background-color: white;
transform: rotateY(180deg);
}
.card .card-content {
position: absolute;
backface-visibility: hidden;
}
.card .card-front {
font-size: 2em;
color: transparent;
}
.card .card-back {
font-size: 2em;
color: black;
position: absolute;
backface-visibility: hidden;
transform: rotateY(180deg);
}
.card.matched {
background-color: lightgreen;
pointer-events: none;
}