mescroll-body.wxss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. .mescroll-body {
  2. position: relative; /* 下拉刷新区域相对自身定位 */
  3. height: auto; /* 不可固定高度,否则overflow:hidden导致无法滑动; 同时使设置的最小高生效,实现列表不满屏仍可下拉*/
  4. overflow: hidden; /* 当有元素写在mescroll-body标签前面时,可遮住下拉刷新区域 */
  5. box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */
  6. }
  7. .mescroll-body .downwarp-content {
  8. display: flex;
  9. justify-content: center;
  10. align-items: center;
  11. }
  12. /* 使sticky生效: 父元素不能overflow:hidden或者overflow:auto属性 */
  13. .mescroll-body.mescorll-sticky{
  14. overflow: unset !important
  15. }
  16. /* 适配 iPhoneX */
  17. @supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
  18. .mescroll-safearea {
  19. padding-bottom: constant(safe-area-inset-bottom);
  20. padding-bottom: env(safe-area-inset-bottom);
  21. }
  22. }
  23. /* 下拉刷新区域 */
  24. .mescroll-downwarp {
  25. position: absolute;
  26. top: -100%;
  27. left: 0;
  28. width: 100%;
  29. height: 100%;
  30. text-align: center;
  31. }
  32. /* 下拉刷新--内容区,定位于区域底部 */
  33. .mescroll-downwarp .downwarp-content {
  34. position: absolute;
  35. left: 0;
  36. bottom: 0;
  37. width: 100%;
  38. min-height: 60rpx;
  39. padding: 20rpx 0;
  40. text-align: center;
  41. }
  42. /* 下拉刷新--提示文本 */
  43. .mescroll-downwarp .downwarp-tip {
  44. display: inline-block;
  45. font-size: 28rpx;
  46. vertical-align: middle;
  47. margin-left: 16rpx;
  48. /* color: gray; 已在style设置color,此处删去*/
  49. }
  50. /* 下拉刷新--旋转进度条 */
  51. .mescroll-downwarp .downwarp-progress {
  52. display: inline-block;
  53. width: 32rpx;
  54. height: 32rpx;
  55. border-radius: 50%;
  56. border: 2rpx solid gray;
  57. border-bottom-color: transparent !important; /*已在style设置border-color,此处需加 !important*/
  58. vertical-align: middle;
  59. }
  60. /* 旋转动画 */
  61. .mescroll-downwarp .mescroll-rotate {
  62. -webkit-animation: mescrollDownRotate 0.6s linear infinite;
  63. animation: mescrollDownRotate 0.6s linear infinite;
  64. }
  65. @-webkit-keyframes mescrollDownRotate {
  66. 0% {
  67. -webkit-transform: rotate(0deg);
  68. transform: rotate(0deg);
  69. }
  70. 100% {
  71. -webkit-transform: rotate(360deg);
  72. transform: rotate(360deg);
  73. }
  74. }
  75. @keyframes mescrollDownRotate {
  76. 0% {
  77. -webkit-transform: rotate(0deg);
  78. transform: rotate(0deg);
  79. }
  80. 100% {
  81. -webkit-transform: rotate(360deg);
  82. transform: rotate(360deg);
  83. }
  84. }
  85. /* 上拉加载区域 */
  86. .mescroll-upwarp {
  87. box-sizing: border-box;
  88. min-height: 110rpx;
  89. padding: 30rpx 0;
  90. text-align: center;
  91. clear: both;
  92. }
  93. /*提示文本 */
  94. .mescroll-upwarp .upwarp-tip,
  95. .mescroll-upwarp .upwarp-nodata {
  96. display: inline-block;
  97. font-size: 28rpx;
  98. vertical-align: middle;
  99. /* color: gray; 已在style设置color,此处删去*/
  100. }
  101. .mescroll-upwarp .upwarp-tip {
  102. margin-left: 16rpx;
  103. }
  104. /*旋转进度条 */
  105. .mescroll-upwarp .upwarp-progress {
  106. display: inline-block;
  107. width: 32rpx;
  108. height: 32rpx;
  109. border-radius: 50%;
  110. border: 2rpx solid gray;
  111. border-bottom-color: transparent !important; /*已在style设置border-color,此处需加 !important*/
  112. vertical-align: middle;
  113. }
  114. /* 旋转动画 */
  115. .mescroll-upwarp .mescroll-rotate {
  116. -webkit-animation: mescrollUpRotate 0.6s linear infinite;
  117. animation: mescrollUpRotate 0.6s linear infinite;
  118. }
  119. @-webkit-keyframes mescrollUpRotate {
  120. 0% {
  121. -webkit-transform: rotate(0deg);
  122. transform: rotate(0deg);
  123. }
  124. 100% {
  125. -webkit-transform: rotate(360deg);
  126. transform: rotate(360deg);
  127. }
  128. }
  129. @keyframes mescrollUpRotate {
  130. 0% {
  131. -webkit-transform: rotate(0deg);
  132. transform: rotate(0deg);
  133. }
  134. 100% {
  135. -webkit-transform: rotate(360deg);
  136. transform: rotate(360deg);
  137. }
  138. }