minirefresh.theme.drawer3d.css
1.47 KB
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
/**
* 3D抽屉效果
*/
.minirefresh-theme-drawer3d .minirefresh-downwrap {
position: absolute;
top: 0;
left: 0;
height: 200px;
background: #000;
/*
* 开启3D视角,经测试,就算不写,只要有translateZ,在iOS下默认也有这个效果
* http://www.w3cplus.com/css3/transform-basic-property.html
* */
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
/**
* 隐藏不可见元素
*/
backface-visibility: hidden;
}
.minirefresh-theme-drawer3d .minirefresh-downwrap .downwrap-content {
width: 100%;
margin-top: 20px;
text-align: center;
}
.minirefresh-theme-drawer3d .state-3d {
width: 100%;
height: 100%;
transform: translateZ(0);
-webkit-transform: translateZ(0);
perspective: 100px;
-webkit-perspective: 100px;
/*
* 视角和子元素的origin保持一致
*/
perspective-origin: center bottom;
-webkit-perspective-origin: center bottom;
}
.minirefresh-theme-drawer3d .drawer3d {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
background: #fff;
text-align: center;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
.minirefresh-theme-drawer3d .drawer3d .drawer3d-mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #d3d3d3;
/*
* 最终的透明度是计算生成的
*/
opacity: 0.4;
}