index.less 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @import '../style/var';
  2. .van-swipe {
  3. position: relative;
  4. overflow: hidden;
  5. // https://github.com/vant-ui/vant/issues/9931
  6. transform: translateZ(0);
  7. cursor: grab;
  8. user-select: none;
  9. &__track {
  10. display: flex;
  11. height: 100%;
  12. &--vertical {
  13. flex-direction: column;
  14. }
  15. }
  16. &__indicators {
  17. position: absolute;
  18. bottom: @swipe-indicator-margin;
  19. left: 50%;
  20. display: flex;
  21. transform: translateX(-50%);
  22. &--vertical {
  23. top: 50%;
  24. bottom: auto;
  25. left: @swipe-indicator-margin;
  26. flex-direction: column;
  27. transform: translateY(-50%);
  28. .van-swipe__indicator:not(:last-child) {
  29. margin-bottom: @swipe-indicator-size;
  30. }
  31. }
  32. }
  33. &__indicator {
  34. width: @swipe-indicator-size;
  35. height: @swipe-indicator-size;
  36. background-color: @swipe-indicator-inactive-background-color;
  37. border-radius: 100%;
  38. opacity: @swipe-indicator-inactive-opacity;
  39. transition: opacity @animation-duration-fast,
  40. background-color @animation-duration-fast;
  41. &:not(:last-child) {
  42. margin-right: @swipe-indicator-size;
  43. }
  44. &--active {
  45. background-color: @swipe-indicator-active-background-color;
  46. opacity: @swipe-indicator-active-opacity;
  47. }
  48. }
  49. }