mescroll-body.wxss 3.6 KB

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