-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflipping_card.html
92 lines (81 loc) · 2.3 KB
/
flipping_card.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
display: grid;
justify-content: center;
align-items: center;
height: 100vh;
}
.flip-card {
background-color: transparent;
width: 300px;
height: 300px;
perspective: 800px;
}
.flip-card-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
transition: transform 0.3s;
transform-style: preserve-3d;
box-shadow: 0 4px 9px 0 rgba(0, 0, 0, 0.2);
backface-visibility: hidden;
-moz-backface-visibility: hidden;
}
.flip-card-front,
.flip-card-back {
position: absolute;
width: 100%;
height: 100%;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.flip-card-front {
background: linear-gradient(to left, #4564fe, #6fb1fc);
z-index: 2;
}
.flip-card-back {
background: linear-gradient(to right, #4564fe, #6fb1fc);
z-index: 1;
transform: rotateY(180deg);
}
h3 {
font-size: 20px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-weight: 500;
padding: 20px;
}
/* .flip-card:focus {
outline: 0;
} */
.flip-card:hover .flip-card-inner,
.flip-card:focus .flip-card-inner {
transform: rotateY(180deg);
}
</style>
</head>
<body>
<div class="flip-card">
<div class="flip-card-inner">
<div class="flip-card-front">
<h3>Hi, I am Ashwani Rajput!</h3>
</div>
<div class="flip-card-back">
<h3>
My Expertise is in frontend and backend stacks.
<br>
and Showing a best usecase in demo to use in your project.
</h3>
</div>
</div>
</div>
</body>
</html>