swiper.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. .cl-swiper {
  2. position: relative;
  3. uni-swiper,
  4. swiper,
  5. swiper-item {
  6. height: 100%;
  7. }
  8. .cl-swiper-item {
  9. display: flex;
  10. justify-content: center;
  11. align-items: center;
  12. height: 100%;
  13. width: 100%;
  14. scoped-slots-default {
  15. height: 100%;
  16. width: 100%;
  17. }
  18. &__image {
  19. height: 100%;
  20. width: 100%;
  21. border-radius: 10rpx;
  22. }
  23. &__video {
  24. height: 100%;
  25. width: 100%;
  26. }
  27. }
  28. &--card {
  29. .cl-swiper-item {
  30. width: 100%;
  31. background-color: #f7f7f7;
  32. transform: scale(0.95, 0.9);
  33. transition: all 0.2s ease-in 0s;
  34. &.is-active {
  35. transform: none;
  36. transition: all 0.2s ease-in 0s;
  37. }
  38. }
  39. }
  40. &--chain {
  41. .cl-swiper-item {
  42. width: calc(100% - 20rpx);
  43. background-color: #f7f7f7;
  44. margin: 0 10rpx;
  45. }
  46. }
  47. &--dot-round {
  48. .wx-swiper-dot,
  49. .a-swiper-dot,
  50. .uni-swiper-dot {
  51. background-color: #ddd;
  52. opacity: 0.6;
  53. width: 12rpx;
  54. height: 12rpx;
  55. border-radius: 12rpx;
  56. margin: 0 6rpx;
  57. border-width: 0;
  58. }
  59. .wx-swiper-dot-active,
  60. .a-swiper-dot-active,
  61. .uni-swiper-dot-active {
  62. background-color: #fff;
  63. opacity: 1;
  64. width: 26rpx;
  65. }
  66. }
  67. &--dot-circle {
  68. .wx-swiper-dot,
  69. .a-swiper-dot,
  70. .uni-swiper-dot {
  71. background-color: #ddd;
  72. opacity: 0.5;
  73. width: 10rpx;
  74. height: 10rpx;
  75. border-radius: 14rpx;
  76. margin: 0 2rpx;
  77. border-color: transparent;
  78. border-width: 2px;
  79. border-style: solid;
  80. }
  81. .wx-swiper-dot-active,
  82. .a-swiper-dot-active,
  83. .uni-swiper-dot-active {
  84. opacity: 1;
  85. border-color: $cl-color-primary;
  86. }
  87. }
  88. &--dot-square {
  89. .wx-swiper-dot,
  90. .a-swiper-dot,
  91. .uni-swiper-dot {
  92. background-color: #ddd;
  93. height: 12rpx;
  94. width: 14rpx;
  95. margin: 0 2rpx;
  96. border-radius: 0;
  97. }
  98. .wx-swiper-dot-active,
  99. .a-swiper-dot-active,
  100. .uni-swiper-dot-active {
  101. background-color: $cl-color-primary;
  102. width: 30rpx;
  103. }
  104. }
  105. &__btn {
  106. button {
  107. position: absolute;
  108. top: calc(50% - 30rpx);
  109. height: 60rpx;
  110. width: 60rpx;
  111. border-radius: 60rpx;
  112. border: 0;
  113. line-height: 60rpx;
  114. padding: 0;
  115. margin: 0;
  116. background-color: rgba(0, 0, 0, 0.4);
  117. color: #ddd;
  118. font-size: 32rpx;
  119. &::after {
  120. border: 0;
  121. }
  122. }
  123. &-prev {
  124. left: 20rpx;
  125. }
  126. &-next {
  127. right: 20rpx;
  128. }
  129. }
  130. }