Skip to content

Commit 07accdb

Browse files
MeetThakurdev-shetty
authored andcommitted
Add files via upload
1 parent d0addb8 commit 07accdb

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

UI Snippets/FlipCard/main.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="stylesheet" href="styles.css">
7+
<title>Document</title>
8+
</head>
9+
<body>
10+
<div class="card">
11+
<div class="card-inner">
12+
<div class="card-front">
13+
<p>Front Side</p>
14+
</div>
15+
<div class="card-back">
16+
<p>Back Side</p>
17+
</div>
18+
</div>
19+
</div>
20+
21+
</body>
22+
</html>

UI Snippets/FlipCard/styles.css

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.card {
2+
padding: 20px;
3+
width: 200px;
4+
height: 300px;
5+
perspective: 1000px;
6+
}
7+
8+
.card-inner {
9+
width: 100%;
10+
height: 100%;
11+
position: relative;
12+
transform-style: preserve-3d;
13+
transition: transform 0.5s;
14+
}
15+
16+
.card:hover .card-inner {
17+
transform: rotateY(180deg);
18+
}
19+
20+
.card-front,
21+
.card-back {
22+
position: absolute;
23+
width: 100%;
24+
height: 100%;
25+
backface-visibility: hidden;
26+
}
27+
28+
.card-front {
29+
background-color: black;
30+
color: #fff;
31+
display: flex;
32+
align-items: center;
33+
border: 10px solid black;
34+
border-radius: 10px;
35+
justify-content: center;
36+
font-size: 24px;
37+
transform: rotateY(0deg);
38+
}
39+
40+
.card-back {
41+
background-color: blue;
42+
color: black;
43+
display: flex;
44+
align-items: center;
45+
border: 10px solid blue;
46+
border-radius: 10px;
47+
justify-content: center;
48+
font-size: 24px;
49+
transform: rotateY(180deg);
50+
}
51+

0 commit comments

Comments
 (0)