-
Notifications
You must be signed in to change notification settings - Fork 0
/
css_code
104 lines (104 loc) · 1.64 KB
/
css_code
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
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
body{
margin: 0;
padding: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-family: "Roboto", sans-serif;
background: linear-gradient(90deg, #fff 50%, #4a1010 50%);
}
input{
display: none;
}
img{
width: 100%;
height: 100%;
}
.book{
display: flex;
}
#cover{
width: 250px;
height: 400px;
}
.flip-book{
width: 250px;
height: 400px;
position: relative;
perspective: 1500px;
}
.flip{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
transform-origin: left;
transform-style: preserve-3d;
transform: rotateY(0deg);
transition: .5s;
color: #000;
}
p{
font-size: 14px;
line-height: 24px;
}
.front{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: #fff;
box-sizing: border-box;
padding: 0 13px;
box-shadow: inset 20px 0 50px rgba(0,0,0,0.5) 0 2px 5px rgba(0,0,0,.5);
}
.back{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 99;
transform: rotateY(180deg);
backface-visibility: hidden;
background: #000;
}
.next-btn{
position: absolute;
bottom: 13px;
right: 13px;
cursor: pointer;
color: #000;
}
.back-btn{
position: absolute;
bottom: 13px;
right: 13px;
cursor: pointer;
color: #fff;
}
#p1{
z-index: 3;
}
#p2{
z-index: 2;
}
#p3{
z-index: 1;
}
#c1:checked ~ .flip-book #p1{
transform: rotateY(-180deg);
z-index: 1;
}
#c2:checked ~ .flip-book #p2{
transform: rotateY(-180deg);
z-index: 2;
}
#c3:checked ~ .flip-book #p3{
transform: rotateY(-180deg);
z-index: 3;
}