mescroll-uni.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /* mescroll-uni
  2. * version 1.1.8
  3. * 2019-11-01 wenju
  4. * http://www.mescroll.com
  5. */
  6. page {
  7. height: 100%;
  8. box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */
  9. -webkit-overflow-scrolling: touch; /*使iOS列表滑动流畅*/
  10. }
  11. .mescroll-uni-warp{
  12. height: 100%;
  13. }
  14. .mescroll-uni {
  15. position: relative;
  16. width: 100%;
  17. height: 100%;
  18. min-height: 200upx;
  19. overflow-y: auto;
  20. box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */
  21. }
  22. /* 定位的方式固定高度 */
  23. .mescroll-uni-fixed{
  24. z-index: 1;
  25. position: fixed;
  26. top: 0;
  27. left: 0;
  28. right: 0;
  29. bottom: 0;
  30. width: auto; /* 使right生效 */
  31. height: auto; /* 使bottom生效 */
  32. }
  33. /* 下拉刷新区域 */
  34. .mescroll-downwarp {
  35. position: absolute;
  36. top: -100%;
  37. left: 0;
  38. width: 100%;
  39. height: 100%;
  40. text-align: center;
  41. }
  42. /* 下拉刷新--内容区,定位于区域底部 */
  43. .mescroll-downwarp .downwarp-content {
  44. position: absolute;
  45. left: 0;
  46. bottom: 0;
  47. width: 100%;
  48. min-height: 60upx;
  49. padding: 20upx 0;
  50. text-align: center;
  51. }
  52. /* 上拉加载区域 */
  53. .mescroll-upwarp {
  54. min-height: 60upx;
  55. padding: 30upx 0;
  56. text-align: center;
  57. clear: both;
  58. }
  59. /* 下拉刷新,上拉加载--提示文本 */
  60. .mescroll-downwarp .downwarp-tip,
  61. .mescroll-upwarp .upwarp-tip,
  62. .mescroll-upwarp .upwarp-nodata {
  63. display: inline-block;
  64. font-size: 28upx;
  65. color: gray;
  66. vertical-align: middle;
  67. }
  68. .mescroll-downwarp .downwarp-tip,
  69. .mescroll-upwarp .upwarp-tip {
  70. margin-left: 16upx;
  71. }
  72. /* 下拉刷新,上拉加载--旋转进度条 */
  73. .mescroll-downwarp .downwarp-progress,
  74. .mescroll-upwarp .upwarp-progress {
  75. display: inline-block;
  76. width: 32upx;
  77. height: 32upx;
  78. border-radius: 50%;
  79. border: 2upx solid gray;
  80. border-bottom-color: transparent;
  81. vertical-align: middle;
  82. }
  83. /* 旋转动画 */
  84. .mescroll-rotate {
  85. -webkit-animation: mescrollRotate 0.6s linear infinite;
  86. animation: mescrollRotate 0.6s linear infinite;
  87. }
  88. @-webkit-keyframes mescrollRotate {
  89. 0% {
  90. -webkit-transform: rotate(0deg);
  91. }
  92. 100% {
  93. -webkit-transform: rotate(360deg);
  94. }
  95. }
  96. @keyframes mescrollRotate {
  97. 0% {
  98. transform: rotate(0deg);
  99. }
  100. 100% {
  101. transform: rotate(360deg);
  102. }
  103. }
  104. /* 无任何数据的空布局 */
  105. .mescroll-empty {
  106. box-sizing: border-box;
  107. width: 100%;
  108. padding: 40upx;
  109. text-align: center;
  110. }
  111. .mescroll-empty.empty-fixed {
  112. z-index: 99;
  113. position: fixed; /*transform会使fixed失效,最终会降级为absolute */
  114. top: 20%;
  115. left: 0;
  116. }
  117. .mescroll-empty .empty-icon {
  118. width: 45%;
  119. }
  120. .mescroll-empty .empty-tip {
  121. margin-top: 20upx;
  122. font-size: 24upx;
  123. color: gray;
  124. }
  125. .mescroll-empty .empty-btn {
  126. display: inline-block;
  127. margin-top: 40upx;
  128. min-width: 200upx;
  129. padding: 18upx;
  130. font-size: 28upx;
  131. border: 1upx solid #E04B28;
  132. border-radius: 60upx;
  133. color: #E04B28;
  134. }
  135. .mescroll-empty .empty-btn:active {
  136. opacity: .75;
  137. }
  138. /* 回到顶部的按钮 */
  139. .mescroll-totop {
  140. z-index: 9990;
  141. position: fixed !important; /* 避免编译到H5,在多mescroll中定位失效 */
  142. right: 20upx;
  143. bottom: 120upx;
  144. width: 72upx;
  145. height: 72upx;
  146. border-radius: 50%;
  147. opacity: 0;
  148. }
  149. /* 显示动画--淡入 */
  150. .mescroll-lazy-in,
  151. .mescroll-fade-in {
  152. -webkit-animation: mescrollFadeIn .3s linear forwards;
  153. animation: mescrollFadeIn .3s linear forwards;
  154. }
  155. @-webkit-keyframes mescrollFadeIn {
  156. 0% {
  157. opacity: 0;
  158. }
  159. 100% {
  160. opacity: 1;
  161. }
  162. }
  163. @keyframes mescrollFadeIn {
  164. 0% {
  165. opacity: 0;
  166. }
  167. 100% {
  168. opacity: 1;
  169. }
  170. }
  171. /* 隐藏动画--淡出 */
  172. .mescroll-fade-out {
  173. pointer-events: none;
  174. -webkit-animation: mescrollFadeOut .5s linear forwards;
  175. animation: mescrollFadeOut .5s linear forwards;
  176. }
  177. @-webkit-keyframes mescrollFadeOut {
  178. 0% {
  179. opacity: 1;
  180. }
  181. 100% {
  182. opacity: 0;
  183. }
  184. }
  185. @keyframes mescrollFadeOut {
  186. 0% {
  187. opacity: 1;
  188. }
  189. 100% {
  190. opacity: 0;
  191. }
  192. }