Slider.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. @import '@/utils/common.scss';
  2. .slider-container {
  3. position: relative;
  4. width: 578px;
  5. height: 120px;
  6. background-color: #787878;
  7. border-radius: 60px;
  8. overflow: hidden;
  9. touch-action: none;
  10. box-sizing: border-box;
  11. }
  12. .slider-item-content{
  13. position: absolute;
  14. height: 120px;
  15. width: 578px;
  16. display: flex;
  17. flex-direction: row;
  18. left: 0;
  19. top: 0;
  20. align-items: center;
  21. }
  22. .slider-item-bg {
  23. // position: absolute;
  24. min-width: 112px;
  25. height: 112px;
  26. border-radius: 56px;
  27. margin-left: 6px;
  28. // left: 4px;
  29. // top: 6px;
  30. background-color: #ffffff;
  31. // overflow: hidden;
  32. position: relative;
  33. }
  34. .slider-item {
  35. position: absolute;
  36. left: 0px;
  37. top: 0px;
  38. min-width: 112px;
  39. height: 112px;
  40. border-radius: 56px;
  41. // width: 100%;
  42. // height: 100%;
  43. }
  44. /* #ifdef weapp */
  45. .slider-top {
  46. position: absolute;
  47. width: 100%;
  48. background-color: #000;
  49. transform: height 0.2s;
  50. }
  51. .slider-bar {
  52. position: absolute;
  53. width: 100%;
  54. background-color: transparent;
  55. bottom: 0;
  56. transition: height 0.2s;
  57. }
  58. .slider-tip-desc {
  59. margin-top: 12px;
  60. font-size: 20px;
  61. line-height: 24px;
  62. background: linear-gradient(90deg, $fastColor 0%, #fff 100%);
  63. -webkit-background-clip: text;
  64. background-clip: text;
  65. color: transparent;
  66. }
  67. .slider-tip-desc-post {
  68. margin-top: 12px;
  69. font-size: 20px;
  70. line-height: 24px;
  71. background: linear-gradient(90deg, #fff 0%, $foodColor 100%);
  72. -webkit-background-clip: text;
  73. background-clip: text;
  74. color: transparent;
  75. }
  76. .tooltip_title {
  77. font-size: 32px;
  78. line-height: 40px;
  79. letter-spacing: 0.05em;
  80. color: #fff;
  81. font-weight: bold;
  82. }
  83. .tooltip_desc {
  84. margin-top: 20px;
  85. font-size: 28px;
  86. line-height: 40px;
  87. letter-spacing: 0.05em;
  88. color: #fff;
  89. opacity: 0.6;
  90. }
  91. /* #endif */
  92. /* #ifdef rn */
  93. .slider-top {
  94. position: absolute;
  95. width: 100%;
  96. background-color: #000;
  97. }
  98. .slider-bar {
  99. position: absolute;
  100. width: 100%;
  101. background-color: transparent;
  102. bottom: 0;
  103. }
  104. .slider-tip-desc {
  105. margin-top: 12px;
  106. font-size: 20px;
  107. line-height: 24px;
  108. // background: linear-gradient(90deg, $fastColor 0%, #fff 100%);
  109. -webkit-background-clip: text;
  110. background-clip: text;
  111. color: transparent;
  112. }
  113. .slider-tip-desc-post {
  114. margin-top: 12px;
  115. font-size: 20px;
  116. line-height: 24px;
  117. // background: linear-gradient(90deg, #fff 0%, $foodColor 100%);
  118. -webkit-background-clip: text;
  119. background-clip: text;
  120. color: transparent;
  121. }
  122. .tooltip_title {
  123. font-size: 32px;
  124. line-height: 40px;
  125. // letter-spacing: 0.05em;
  126. color: #fff;
  127. font-weight: bold;
  128. }
  129. .tooltip_desc {
  130. margin-top: 20px;
  131. font-size: 28px;
  132. line-height: 40px;
  133. // letter-spacing: 0.05em;
  134. color: #fff;
  135. opacity: 0.6;
  136. }
  137. /* #endif */
  138. .slider-handle {
  139. position: absolute;
  140. bottom: 0;
  141. width: 100%;
  142. text-align: center;
  143. color: #fff;
  144. }
  145. .slider-text-bg {
  146. display: flex;
  147. position: absolute;
  148. left: 45px;
  149. top: 0;
  150. // width: 120px;
  151. height: 120px;
  152. align-items: center;
  153. justify-content: center;
  154. pointer-events: none;
  155. }
  156. .slider-arrow-bg {
  157. display: flex;
  158. position: absolute;
  159. left: 0;
  160. top: 0;
  161. width: 120px;
  162. height: 120px;
  163. align-items: center;
  164. justify-content: center;
  165. pointer-events: none;
  166. // background-color: red;
  167. // opacity: 0.5;
  168. }
  169. .slider-text {
  170. color: #000;
  171. font-size: 48px;
  172. font-weight: bold;
  173. }
  174. .slider-arrow {
  175. width: 56px;
  176. height: 56px;
  177. }
  178. .tooltip_bg {
  179. width: 578px;
  180. height: 400px;
  181. pointer-events: none;
  182. z-index: 1;
  183. position: absolute;
  184. left: 0;
  185. top: -410px;
  186. display: flex;
  187. flex-direction: column;
  188. }
  189. .tooltip_content {
  190. width: 578px;
  191. padding-left: 40px;
  192. padding-right: 40px;
  193. padding-top: 40px;
  194. padding-bottom: 40px;
  195. box-sizing: border-box;
  196. border-radius: 16px;
  197. background-color: $tipBgColor;
  198. display: flex;
  199. flex-direction: column;
  200. }
  201. .tooltip_arrow {
  202. width: 0;
  203. height: 0;
  204. margin-top: -2px;
  205. border-left: 25px solid transparent;
  206. border-right: 25px solid transparent;
  207. border-top: 20px solid $tipBgColor;
  208. }
  209. .slider-tip-bg {
  210. position: absolute;
  211. right: 0;
  212. height: 120px;
  213. top: 0;
  214. min-width: 180px;
  215. display: flex;
  216. flex-direction: column;
  217. align-items: center;
  218. justify-content: center;
  219. // background-color: red;
  220. }
  221. .slider-tip-title {
  222. font-size: 32px;
  223. line-height: 32px;
  224. font-weight: bold;
  225. color: $fastColor;
  226. }
  227. .slider-tip-title-post {
  228. font-size: 32px;
  229. line-height: 32px;
  230. font-weight: bold;
  231. color: $foodColor;
  232. }