tabs.wxss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. .t-float-left {
  2. float: left;
  3. }
  4. .t-float-right {
  5. float: right;
  6. }
  7. @keyframes tdesign-fade-out {
  8. from {
  9. opacity: 1;
  10. }
  11. to {
  12. opacity: 0;
  13. }
  14. }
  15. .hotspot-expanded.relative {
  16. position: relative;
  17. }
  18. .hotspot-expanded::after {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. transform: scale(1.5);
  27. }
  28. page {
  29. --td-tab-nav-bg-color: #fff;
  30. --td-tab-item-color: rgba(0, 0, 0, 0.6);
  31. --td-tab-item-active-color: #0052d9;
  32. --td-tab-item-disabled-color: #c8c9cc;
  33. --td-tab-track-color: #0052d9;
  34. --td-tab-track-thickness: 4rpx;
  35. --td-tab-border-color: rgba(150, 95, 95, 0.12);
  36. }
  37. .t-tabs {
  38. position: relative;
  39. font-size: 28rpx;
  40. background-color: #fff;
  41. }
  42. .t-tabs__wrapper {
  43. display: flex;
  44. overflow: hidden;
  45. }
  46. .t-tabs .t-is-active {
  47. font-weight: 700;
  48. color: var(--td-tab-item-active-color, #0052d9);
  49. }
  50. .t-tabs .t-is-disabled {
  51. color: var(--td-tab-item-disabled-color, #c8c9cc);
  52. }
  53. .t-tabs__item {
  54. flex: 1;
  55. font-weight: 400;
  56. color: var(--td-tab-item-color, rgba(0, 0, 0, 0.6));
  57. }
  58. .t-tabs__item--top,
  59. .t-tabs__item--bottom {
  60. height: 92rpx;
  61. line-height: 92rpx;
  62. text-align: center;
  63. min-width: 162rpx;
  64. }
  65. .t-tabs__item--left,
  66. .t-tabs__item--right {
  67. text-align: center;
  68. height: 108rpx;
  69. line-height: 108rpx;
  70. width: 208rpx;
  71. background-color: #f3f3f3;
  72. }
  73. .t-tabs__item--left.t-is-active,
  74. .t-tabs__item--right.t-is-active {
  75. background-color: #fff;
  76. }
  77. .t-tabs__content {
  78. overflow: hidden;
  79. }
  80. .t-tabs__nav {
  81. position: relative;
  82. user-select: none;
  83. width: 100%;
  84. display: flex;
  85. flex-wrap: nowrap;
  86. align-items: center;
  87. }
  88. .t-tabs__nav--left,
  89. .t-tabs__nav--right {
  90. flex-direction: column;
  91. }
  92. .t-tabs__track {
  93. position: absolute;
  94. font-weight: 600;
  95. z-index: 1;
  96. transition-duration: 0.3s;
  97. background-color: var(--td-tab-track-color, #0052d9);
  98. }
  99. .t-tabs__track--left {
  100. left: 0;
  101. top: 0;
  102. width: var(--td-tab-track-thickness, 4rpx);
  103. }
  104. .t-tabs__track--right {
  105. right: 0;
  106. top: 0;
  107. width: var(--td-tab-track-thickness, 4rpx);
  108. }
  109. .t-tabs__scroll--top,
  110. .t-tabs__scroll--bottom {
  111. height: 92rpx;
  112. position: relative;
  113. background-color: var(--td-tab-nav-bg-color, #fff);
  114. }
  115. .t-tabs__scroll--top::after,
  116. .t-tabs__scroll--bottom::after {
  117. content: '';
  118. }
  119. .t-tabs__scroll--top {
  120. border-bottom: solid 1rpx var(--td-tab-border-color, rgba(150, 95, 95, 0.12));
  121. }
  122. .t-tabs__content-inner {
  123. display: block;
  124. }
  125. .t-tabs__sticky--left,
  126. .t-tabs__sticky--right {
  127. width: 208rpx;
  128. }
  129. .t-tabs.t-tabs--top,
  130. .t-tabs.t-tabs--bottom {
  131. flex-wrap: wrap;
  132. }
  133. .t-tabs.t-tabs--top .t-tabs__content-inner,
  134. .t-tabs.t-tabs--bottom .t-tabs__content-inner {
  135. position: relative;
  136. width: 100%;
  137. height: 100%;
  138. display: flex;
  139. transition-property: transform;
  140. }
  141. .t-tabs.t-tabs--top .t-tabs__track,
  142. .t-tabs.t-tabs--bottom .t-tabs__track {
  143. left: 0;
  144. bottom: 0;
  145. height: var(--td-tab-track-thickness, 4rpx);
  146. }
  147. .t-tabs.t-tabs--top .t-tabs__content,
  148. .t-tabs.t-tabs--bottom .t-tabs__content {
  149. width: 100%;
  150. }
  151. .t-tabs.t-tabs--bottom {
  152. flex-direction: column-reverse;
  153. }
  154. .t-tabs.t-tabs--left .t-tabs__content-inner,
  155. .t-tabs.t-tabs--right .t-tabs__content-inner {
  156. position: relative;
  157. width: 100%;
  158. height: 100%;
  159. display: flex;
  160. flex-direction: column;
  161. transition-property: transform;
  162. }
  163. .t-tabs.t-tabs--left .t-tabs__content,
  164. .t-tabs.t-tabs--right .t-tabs__content {
  165. width: calc(100% - 208rpx);
  166. height: 100%;
  167. position: absolute;
  168. top: 0;
  169. left: 208rpx;
  170. overflow: hidden;
  171. }
  172. .t-tabs.t-tabs--right {
  173. flex-direction: row-reverse;
  174. }