-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcard.html
More file actions
158 lines (133 loc) · 3.83 KB
/
Copy pathcard.html
File metadata and controls
158 lines (133 loc) · 3.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flip Card</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Roboto', sans-serif;
background: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 16px;
}
.card-container {
width: 100%;
max-width: 360px;
height: 560px;
perspective: 1000px;
}
.card {
width: 100%;
height: 100%;
position: relative;
transition: transform 0.8s;
transform-style: preserve-3d;
}
.card-container:hover .card {
transform: rotateY(180deg);
}
.card-side {
position: absolute;
width: 100%;
height: 100%;
background-color: white;
border-radius: 20px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
backface-visibility: hidden;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 18px;
}
.card-front img {
width: 100%;
height: 55%;
border-radius: 10px;
object-fit: cover;
}
.card-front h2,
.card-back h2 {
font-size: 1.4rem;
text-align: center;
}
.card-front p,
.card-back p {
font-size: 1rem;
text-align: center;
}
.card-back {
transform: rotateY(180deg);
}
.btn {
padding: 10px 20px;
background-color: #8BC6EC;
color: #fff;
text-decoration: none;
border-radius: 10px;
font-weight: bold;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #5faee3;
}
/* Mobile (300px – 480px) */
@media (max-width: 480px) {
.card-container {
max-width: 300px;
height: 480px;
}
.card-front img {
height: 50%;
}
h2 {
font-size: 1.2rem;
}
p {
font-size: 0.95rem;
}
}
/* Tablet (481px – 768px) */
@media (min-width: 481px) and (max-width: 768px) {
.card-container {
max-width: 400px;
height: 580px;
}
}
/* Desktop (769px – 1000px) */
@media (min-width: 769px) and (max-width: 1000px) {
.card-container {
max-width: 420px;
height: 600px;
}
}
</style>
</head>
<body>
<div class="card-container">
<div class="card">
<div class="card-side card-front">
<img src="images/qrcode.png" alt="QR Code Image">
<h2>Improve your front end skills by developing Projects</h2>
<p>Learn HTML, CSS, and JavaScript through real-world projects.</p>
</div>
<div class="card-side card-back">
<h2>Keep Practicing!</h2>
<p>Success comes with consistency. Build one project every week 🚀</p>
<a href="#" class="btn">View Project</a>
</div>
</div>
</div>
</body>
</html>