卡片翻转动效

卡片翻转动效

地址

预览地址

资料

资料

视频地址

效果图

截图

截图

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
# html
<div class="container">
<div class="box">
<div class="positive"></div>
<div class="negative"></div>
</div>
</div>
# css

.box{
position: relative;
width: 250px;
height: 380px;
margin-left: auto;
margin-right: auto;
transform: rotateY(0deg);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transition: transform .8s ease-in-out;
-moz-transition: transform .8s ease-in-out;
transition: transform .8s ease-in-out;

-webkit-perspective: 800px;
-moz-perspective: 800px;
perspective: 800px;
}
.positive,
.negative{
width: 250px;
height: 380px;
background-size: cover;
position: absolute;
backface-visibility: hidden;

}

.positive{
transform: rotateY(0deg);
background-image: url(../img/正面.jpg);
}
.negative{
background-image: url(../img/反面.jpg);
transform: rotateY(180deg);
}

.box:hover{
transform: rotateY(180deg);
}