-
Notifications
You must be signed in to change notification settings - Fork 0
/
card_matching.html
64 lines (59 loc) · 1.3 KB
/
card_matching.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Card Matching</title>
<style>
#wrapper {
display: flex;
}
.card-container {
display: inline-grid;
grid-template-columns: repeat(4, 1fr);
column-gap: 1rem;
row-gap: 1.5rem;
min-width: 600px;
margin: 0 auto;
}
.card {
height: 200px;
}
.card-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
transition: transform 0.8s;
transform-style: preserve-3d;
}
.card.flipped .card-inner {
transform: rotateY(180deg);
}
.card-front {
background: black;
}
.card-front,
.card-back {
position: absolute;
width: 100%;
height: 100%;
border: 1px solid black;
backface-visibility: hidden;
}
.card-back {
transform: rotateY(180deg);
}
.done .card-back {
opacity: 40%;
border: 3px solid blue;
}
</style>
</head>
<body>
<div style="color: orange; padding: 10px;">
Go to the main page <a href="index.html">Click!!</a>
</div>
<div id="wrapper"></div>
<script src="card_matching.js"></script>
</body>
</html>