-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
207 lines (204 loc) · 7.5 KB
/
index.html
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<html class=''>
<head>
<title>h5仿原生闲鱼app发布按钮效果</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<style class="cp-pen-styles">
@import url("http://daneden.github.io/animate.css/animate.min.css");
:root
{
width: 100%;
height: 100%;
}
html,body{
padding: 0px;
margin: 0px;
}
body
{
width: 100%;
height: 100%;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
overflow: hidden;
background-color: #fff;
}
.papersheet
{
position: relative;
overflow: hidden;
text-align: center;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: all 200ms;
transition: all 200ms;
width: 100%;
height: 100%;
min-height: 20rem;
margin: 0 auto;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.papersheet__trigger
{
z-index: 1;
display: inline-block;
border-radius: 50%;
position: absolute;
background-color: #000;
top: 80%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-webkit-transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
cursor: pointer;
}
.opened{
width: 100%;
height: 100%;
background: #333;
z-index: 2;
}
.papersheet__trigger:before
{
content: "";
background-color: #ffd946;
display: block;
position: absolute;
border-radius: 50%;
top: 50%;
left: 50%;
bottom: 50%;
right: 50%;
width: 3rem;
height: 3rem;
z-index: 0;
pointer-events: none;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-webkit-transition-delay: 2s;
transition-delay: 2s;
-webkit-transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
}
.papersheet__trigger-icon
{
fill: #fff;
vertical-align: bottom;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
-webkit-transition-delay: 50ms;
transition-delay: 50ms;
width: 1rem;
height: 1rem;
}
.opened .papersheet__trigger-icon
{
-webkit-transform: rotate(-360deg);
-ms-transform: rotate(-360deg);
transform: rotate(-360deg);
}
.papersheet__face-item
{
z-index: 1;
height: 4rem;
width: 4rem;
border-radius: 50%;
display: none;
overflow: hidden;
position: relative;
margin-left: 1.5rem;
position: relative;
top: 50px;
}
.papersheet__face-item:nth-child(2)
{ margin-left: 0px;
-webkit-animation-delay: 250ms;
animation-delay: 250ms;
}
.papersheet__face-item:nth-child(3)
{
-webkit-animation-delay: 450ms;
animation-delay: 450ms;
}
.papersheet__face-item:nth-child(4)
{
-webkit-animation-delay: 650ms;
animation-delay: 650ms;
}
.papersheet__face-item img
{
max-width: 100%;
}
.opened .papersheet__face-item
{
-webkit-transform: translateX(-60%);
-ms-transform: translateX(-60%);
transform: translateX(-60%);
display: block;
}
</style>
</head>
<body>
<div class="papersheet">
<!-- Action Trigger -->
<div class="papersheet__trigger">
<!-- Icon -->
<svg class="papersheet__trigger-icon" viewbox="0 0 24 24"><g transform="scale(0.023 0.023)"><path d="M1014.662 822.66c-0.004-0.004-0.008-0.008-0.012-0.010l-310.644-310.65 310.644-310.65c0.004-0.004 0.008-0.006 0.012-0.010 3.344-3.346 5.762-7.254 7.312-11.416 4.246-11.376 1.824-24.682-7.324-33.83l-146.746-146.746c-9.148-9.146-22.45-11.566-33.828-7.32-4.16 1.55-8.070 3.968-11.418 7.31 0 0.004-0.004 0.006-0.008 0.010l-310.648 310.652-310.648-310.65c-0.004-0.004-0.006-0.006-0.010-0.010-3.346-3.342-7.254-5.76-11.414-7.31-11.38-4.248-24.682-1.826-33.83 7.32l-146.748 146.748c-9.148 9.148-11.568 22.452-7.322 33.828 1.552 4.16 3.97 8.072 7.312 11.416 0.004 0.002 0.006 0.006 0.010 0.010l310.65 310.648-310.65 310.652c-0.002 0.004-0.006 0.006-0.008 0.010-3.342 3.346-5.76 7.254-7.314 11.414-4.248 11.376-1.826 24.682 7.322 33.83l146.748 146.746c9.15 9.148 22.452 11.568 33.83 7.322 4.16-1.552 8.070-3.97 11.416-7.312 0.002-0.004 0.006-0.006 0.010-0.010l310.648-310.65 310.648 310.65c0.004 0.002 0.008 0.006 0.012 0.008 3.348 3.344 7.254 5.762 11.414 7.314 11.378 4.246 24.684 1.826 33.828-7.322l146.746-146.748c9.148-9.148 11.57-22.454 7.324-33.83-1.552-4.16-3.97-8.068-7.314-11.414z"></path></g></svg>
</div>
<!-- Face 1 -->
<div class="papersheet__face-item animated bounceInUp">
<img src="128.jpg" alt="" />
</div>
<!-- Face 2 -->
<div class="papersheet__face-item animated bounceInUp">
<img src="129.jpg" alt="" />
</div>
<!-- Face 2 -->
<div class="papersheet__face-item animated bounceInUp">
<img src="130.jpg" alt="" />
</div>
</div>
<script src='jquery.js'></script>
<script>
var docEl = document.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 20 * (clientWidth / 375) + 'px';
};
recalc();
window.addEventListener(resizeEvt, recalc, false);
_papersheet = $('.papersheet');
_trigger = $('.papersheet__trigger');
_trigger.click(function () {
if (_papersheet.hasClass('opened')) {
$(this).parent('.papersheet').stop().removeClass('opened');
} else {
$(this).parent('.papersheet').stop().addClass('opened');
}
});
</script>
</body>
</html>