mescroll-top.wxss 886 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* 回到顶部的按钮 */
  2. .mescroll-totop {
  3. z-index: 9990;
  4. position: fixed !important; /* 加上important避免编译到H5,在多mescroll中定位失效 */
  5. right: 20rpx;
  6. bottom: 120rpx;
  7. width: 72rpx;
  8. height: auto;
  9. border-radius: 50%;
  10. opacity: 0;
  11. -webkit-transition: opacity 0.5s;
  12. transition: opacity 0.5s; /* 过渡 */
  13. margin-bottom: 0px; /* css变量 */
  14. }
  15. /* 适配 iPhoneX */
  16. @supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
  17. .mescroll-totop-safearea {
  18. margin-bottom: calc(0px + constant(safe-area-inset-bottom)); /* window-bottom + 适配 iPhoneX */
  19. margin-bottom: calc(0px + env(safe-area-inset-bottom));
  20. }
  21. }
  22. /* 显示 -- 淡入 */
  23. .mescroll-totop-in {
  24. opacity: 1;
  25. }
  26. /* 隐藏 -- 淡出且不接收事件*/
  27. .mescroll-totop-out {
  28. opacity: 0;
  29. pointer-events: none;
  30. }