minirefresh.css
5.37 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
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
.minirefresh-wrap {
position: absolute;
/*
* 标明了top和bottom 滑动的就是minirefresh-wrap而不再是document.body
*/
top: 0;
bottom: 0;
left: 0;
width: 100%;
/*
* 去除wrap层的滚动条,确保只有scrol层有滚动条
*/
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
/**
* 使用3d加速时,尽可能的使用index,防止浏览器默认给后续的元素创建复合层渲染
* 因为CSS3中,如果这个元素添加了硬件加速,并且index层级比较低,
* 在这个元素的后面其它元素(层级比这个元素高的,或者相同的,并且releative或absolute属性相同的),会默认变为复合层渲染
* 如果处理不当会极大的影响性能,可以用chrome的rending查看
*/
z-index: 1;
}
.minirefresh-scroll {
position: relative;
/*
* 默认背景色改成白色,直接避免下拉和正文重叠现象,可以覆盖
*/
background: #fff;
}
.body-scroll-wrap {
position: relative;
}
.minirefresh-hardware-speedup {
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
transform: translateZ(0);
}
.minirefresh-hidden {
display: none !important;
}
.minirefresh-wrap::-webkit-scrollbar-track {
background-color: transparent;
}
.minirefresh-wrap::-webkit-scrollbar {
width: 6px;
}
.minirefresh-hide-scrollbar::-webkit-scrollbar {
width: 0;
}
.minirefresh-wrap::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: #ccc;
}
.minirefresh-wrap::-webkit-scrollbar-thumb:hover {
background-color: #aaa;
}
.minirefresh-rotate {
-webkit-animation: minirefresh-rotate 0.6s linear infinite;
animation: minirefresh-rotate 0.6s linear infinite;
}
.minirefresh-fade-in {
-webkit-animation: minirefresh-fade-in 0.5s linear forwards;
animation: minirefresh-fade-in 0.5s linear forwards;
}
.minirefresh-fade-out {
pointer-events: none;
-webkit-animation: minirefresh-fade-out 0.5s linear forwards;
animation: minirefresh-fade-out 0.5s linear forwards;
}
.minirefresh-totop {
position: fixed;
z-index: 9990;
right: 10px;
bottom: 30px;
width: 36px;
height: 36px;
border-radius: 50%;
background-image: url("images/minirefresh-totop.png");
background-size: 100% 100%;
}
@-moz-keyframes minirefresh-fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes minirefresh-fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-o-keyframes minirefresh-fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes minirefresh-fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-moz-keyframes minirefresh-fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes minirefresh-fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-o-keyframes minirefresh-fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes minirefresh-fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-moz-keyframes minirefresh-rotate {
0% {
-webkit-transform: rotateZ(0deg);
transform: rotateZ(0deg);
-moz-transform: rotate(0deg);
}
100% {
-webkit-transform: rotateZ(360deg);
transform: rotateZ(360deg);
-moz-transform: rotate(360deg);
}
}
@-webkit-keyframes minirefresh-rotate {
0% {
-webkit-transform: rotateZ(0deg);
transform: rotateZ(0deg);
-moz-transform: rotate(0deg);
}
100% {
-webkit-transform: rotateZ(360deg);
transform: rotateZ(360deg);
-moz-transform: rotate(360deg);
}
}
@-o-keyframes minirefresh-rotate {
0% {
-webkit-transform: rotateZ(0deg);
transform: rotateZ(0deg);
-moz-transform: rotate(0deg);
}
100% {
-webkit-transform: rotateZ(360deg);
transform: rotateZ(360deg);
-moz-transform: rotate(360deg);
}
}
@keyframes minirefresh-rotate {
0% {
-webkit-transform: rotateZ(0deg);
transform: rotateZ(0deg);
-moz-transform: rotate(0deg);
}
100% {
-webkit-transform: rotateZ(360deg);
transform: rotateZ(360deg);
-moz-transform: rotate(360deg);
}
}
/*
* 引入默认的主题
*/
.minirefresh-theme-default .minirefresh-downwrap {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 75px;
}
.minirefresh-theme-default .minirefresh-upwrap {
min-height: 30px;
padding: 15px 0;
text-align: center;
}
.minirefresh-theme-default .downwrap-content {
/*position: absolute;*/
width: 100%;
padding: 10px 0;
text-align: center;
}
.minirefresh-theme-default .minirefresh-downwrap .downwrap-progress,
.minirefresh-theme-default .minirefresh-upwrap .upwrap-progress {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
border: 1px solid #808080;
margin-right: 8px;
border-bottom-color: transparent;
vertical-align: middle;
}
.minirefresh-theme-default .minirefresh-downwrap .downwrap-success,
.minirefresh-theme-default .minirefresh-downwrap .downwrap-error {
/*border-bottom-color: gray;*/
display: none;
}
.minirefresh-theme-default .minirefresh-downwrap .downwrap-tips,
.minirefresh-theme-default .minirefresh-upwrap .upwrap-tips {
display: inline-block;
font-size: 12px;
color: #808080;
vertical-align: middle;
}
.minirefresh-theme-default .status-nomore .upwrap-tips {
/*
* vertical-align: middle;会导致显示不全,display:block也不起作用
* 因此设置一个padding
*/
padding: 15px 0;
}