tabs.wxss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. .t-tabs {
  29. display: flex;
  30. font-size: 28rpx;
  31. background-color: #fff;
  32. }
  33. .t-tabs .t-is-active {
  34. font-weight: 700;
  35. color: #0052d9;
  36. }
  37. .t-tabs .t-is-disabled {
  38. color: #c8c9cc;
  39. }
  40. .t-tabs__item {
  41. flex: 1;
  42. font-weight: 400;
  43. }
  44. .t-tabs__content {
  45. overflow: hidden;
  46. }
  47. .t-tabs__nav {
  48. position: relative;
  49. z-index: 0;
  50. user-select: none;
  51. width: 100%;
  52. display: flex;
  53. flex-wrap: nowrap;
  54. align-items: center;
  55. }
  56. .t-tabs__track {
  57. position: absolute;
  58. font-weight: 600;
  59. z-index: 1;
  60. }
  61. .t-tabs__content-inner {
  62. display: block;
  63. }
  64. .t-tabs.t-tabs--top,
  65. .t-tabs.t-tabs--bottom {
  66. flex-wrap: wrap;
  67. }
  68. .t-tabs.t-tabs--top .t-tabs__content-inner,
  69. .t-tabs.t-tabs--bottom .t-tabs__content-inner {
  70. position: relative;
  71. width: 100%;
  72. height: 100%;
  73. display: flex;
  74. transition-property: transform;
  75. }
  76. .t-tabs.t-tabs--top .t-tabs__scroll,
  77. .t-tabs.t-tabs--bottom .t-tabs__scroll {
  78. position: relative;
  79. }
  80. .t-tabs.t-tabs--top .t-tabs__scroll::after,
  81. .t-tabs.t-tabs--bottom .t-tabs__scroll::after {
  82. content: '';
  83. }
  84. .t-tabs.t-tabs--top .t-tabs__item,
  85. .t-tabs.t-tabs--bottom .t-tabs__item {
  86. height: 92rpx;
  87. line-height: 92rpx;
  88. text-align: center;
  89. min-width: 162rpx;
  90. }
  91. .t-tabs.t-tabs--top .t-tabs__track,
  92. .t-tabs.t-tabs--bottom .t-tabs__track {
  93. left: 0;
  94. bottom: 0;
  95. height: 4rpx;
  96. }
  97. .t-tabs.t-tabs--top .t-tabs__content,
  98. .t-tabs.t-tabs--bottom .t-tabs__content {
  99. width: 100%;
  100. }
  101. .t-tabs.t-tabs--top .t-tabs__scroll {
  102. border-bottom: solid 1rpx rgba(150, 95, 95, 0.12);
  103. }
  104. .t-tabs.t-tabs--bottom {
  105. flex-direction: column-reverse;
  106. }
  107. .t-tabs.t-tabs--left .t-tabs__content-inner,
  108. .t-tabs.t-tabs--right .t-tabs__content-inner {
  109. position: relative;
  110. width: 100%;
  111. height: 100%;
  112. display: flex;
  113. flex-direction: column;
  114. transition-property: transform;
  115. }
  116. .t-tabs.t-tabs--left .t-tabs__scroll,
  117. .t-tabs.t-tabs--right .t-tabs__scroll {
  118. width: auto;
  119. }
  120. .t-tabs.t-tabs--left .t-tabs__nav,
  121. .t-tabs.t-tabs--right .t-tabs__nav {
  122. flex-direction: column;
  123. }
  124. .t-tabs.t-tabs--left .t-tabs__item,
  125. .t-tabs.t-tabs--right .t-tabs__item {
  126. text-align: center;
  127. height: 108rpx;
  128. line-height: 108rpx;
  129. width: 208rpx;
  130. background-color: #f3f3f3;
  131. }
  132. .t-tabs.t-tabs--left .t-tabs__item.t-is-active,
  133. .t-tabs.t-tabs--right .t-tabs__item.t-is-active {
  134. background-color: #fff;
  135. }
  136. .t-tabs.t-tabs--left .t-tabs__content,
  137. .t-tabs.t-tabs--right .t-tabs__content {
  138. width: 100%;
  139. }
  140. .t-tabs.t-tabs--left .t-tabs__track {
  141. left: 0;
  142. top: 0;
  143. width: 4rpx;
  144. }
  145. .t-tabs.t-tabs--right {
  146. flex-direction: row-reverse;
  147. }
  148. .t-tabs.t-tabs--right .t-tabs__track {
  149. right: 0;
  150. top: 0;
  151. width: 4rpx;
  152. }