This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
44 lines (42 loc) · 1.57 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS Flip Card</title>
<link href="app.css?cache=20221030101425" rel="stylesheet">
</head>
<body>
<div>
<div id="flip-card" class="flip-card">
<div class="flip-card__content">
<div class="flip-card__front">
<!-- Start: Custom Content (Front) -->
<div class="playing-card playing-card--back"></div>
<!-- End: Custom Content (Front) -->
</div>
<div class="flip-card__back">
<!-- Start: Custom Content (Back) -->
<div class="playing-card playing-card--front"></div>
<!-- End: Custom Content (Back) -->
</div>
</div>
</div>
<div class="text-center mt-8">
<button id="button" type="button"
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
Flip card
</button>
</div>
</div>
<script>
const button = document.getElementById('button');
const flipCard = document.getElementById('flip-card');
button.addEventListener('click', () => {
flipCard.classList.toggle('flip-card--flipped');
});
</script>
</body>
</html>