-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflip.css
More file actions
57 lines (50 loc) · 811 Bytes
/
flip.css
File metadata and controls
57 lines (50 loc) · 811 Bytes
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
body{
margin:0;
padding:0;
}
.container{
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
}
.book{
position:relative;
width:400px;
height:600px;
transform-style:preserve-3d;
transform:perspective(2000px);
}
.book:hover{
z-index:1;
transform:perspective(2000px);
box-shadow:inset 10px 0 50px rgba(0,0,0,0.5);
}
.book .cover{
position:relative;
width:100%;
height:100%;
box-sizing:border-box;
transform-origin:left;
z-index:1;
transition:1s;
}
.book:hover .cover{
transform:rotateY(-135deg);
}
.book .cover img{
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
object-fit:cover;
}
.book .details img{
position:absolute;
top:0;
left:0;
box-sizing:border-box;
width:100%;
height:100%;
}