-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2.css
83 lines (73 loc) · 1.28 KB
/
2.css
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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #6b5b95;
font-family: fantasy;
}
label {
display: block;
position: absolute;
top: 50%;
left: 50%;
width: 280px;
height: 350px;
perspective: 1000px;
transform-style: preserve-3d;
transform: translate(-50%, -50%);
cursor: pointer;
}
.flip-card {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: all 0.5s ease-in-out;
z-index: 1;
}
.flip-card .front,
.flip-card .back {
position: absolute;
width: 100%;
height: 100%;
text-align: center;
background: #fff;
backface-visibility: hidden;
}
.flip-card .back {
transform: rotateX(180deg);
color: #000;
background: #a0d2eb;
}
label:hover .flip-card {
transform: rotateX(20deg);
box-shadow: 0 20px 20px rgba(50, 50, 50, 0.4);
}
input {
display: none;
}
:checked + .flip-card {
transform: rotateX(180deg);
}
label:hover :checked + .flip-card {
transform: rotateX(160deg);
box-shadow: 0 20px 20px rgba(50, 50, 50, 0.4);
}
.front img {
width: 280px;
height: 350px;
}
.back h1 {
color: #f75990;
margin: 15px 0 0 0;
font-size:23px;
}
.back p {
font-size: 16px;
color: #000;
padding: 0 18px;
line-height: 30px;
margin: 0 auto;
}