-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (53 loc) · 1.18 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<title>Flip Effect Example</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<style>
.block {
width: 200px;
height: 200px;
perspective: 800px;
position: relative;
transform-style: preserve-3d;
transition: transform 0.5s;
}
.block:hover {
transform: rotateY(180deg);
}
.block__face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
}
.block__front {
background-color: #f2f2f2;
}
.block__back {
transform: rotateY(180deg);
background-color: #ddd;
}
/* Optional styling */
.block__front,
.block__back {
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
color: white;
font-weight: bold;
}
</style>
</head>
<body>
<div class="block">
<div class="block__face block__front">
<h1>Front Face</h1>
</div>
<div class="block__face block__back">
<h1>Back Face</h1>
</div>
</div>
</body>
</html>