index.less 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. @import '../../app.less';
  2. .tabs.border {
  3. border-bottom: 1px solid @line_color;
  4. }
  5. .tabs.line {
  6. text-align: center;
  7. height: 44px;
  8. line-height: 44px;
  9. background: #fff;
  10. .tab {
  11. display: inline-block;
  12. position: relative;
  13. text-align: center;
  14. color: @base_color;
  15. width: 120px;
  16. margin: 0 30px;
  17. cursor: pointer;
  18. }
  19. .tab::after {
  20. content: '';
  21. width: 0;
  22. height: 4px;
  23. background: @theme_color;
  24. transform: translateX(-50%);
  25. transition: all 0.25s;
  26. position: absolute;
  27. bottom: 0;
  28. left: 50%;
  29. }
  30. .tab:hover,
  31. .tab.active {
  32. color: @theme_color;
  33. }
  34. .tab:hover::after,
  35. .tab.active::after {
  36. width: 100%;
  37. }
  38. }
  39. .tabs.card {
  40. display: flex;
  41. text-align: center;
  42. height: 44px;
  43. line-height: 44px;
  44. background: @theme_bg_color;
  45. a {
  46. display: inline-block;
  47. flex: 1;
  48. }
  49. .tab {
  50. width: 100%;
  51. display: inline-block;
  52. position: relative;
  53. text-align: center;
  54. color: @base_color;
  55. cursor: pointer;
  56. }
  57. .tab::after {
  58. content: '';
  59. width: 0;
  60. height: 4px;
  61. background: @theme_color;
  62. transform: translateX(-50%);
  63. position: absolute;
  64. top: 0;
  65. left: 50%;
  66. }
  67. .tab:hover,
  68. .tab.active {
  69. color: @theme_color;
  70. background: #fff;
  71. }
  72. .tab:hover::after,
  73. .tab.active::after {
  74. width: 100%;
  75. }
  76. }
  77. .tabs.text {
  78. height: 44px;
  79. line-height: 44px;
  80. padding-left: 44px;
  81. background: #fff;
  82. .tab {
  83. display: inline-block;
  84. position: relative;
  85. text-align: center;
  86. color: @base_color;
  87. margin: 0 13px;
  88. cursor: pointer;
  89. }
  90. .tab::after {
  91. content: '';
  92. width: 1px;
  93. height: 20px;
  94. background: @line_color;
  95. position: absolute;
  96. top: 12px;
  97. right: -13px;
  98. }
  99. .tab:hover,
  100. .tab.active {
  101. color: @theme_color;
  102. }
  103. a:nth-last-child(1) {
  104. .tab::after {
  105. display: none;
  106. }
  107. }
  108. }
  109. .tabs.division {
  110. display: flex;
  111. text-align: center;
  112. height: 44px;
  113. line-height: 44px;
  114. margin: 0 -5px;
  115. a {
  116. display: inline-block;
  117. flex: 1;
  118. width: 100%;
  119. padding: 0 5px;
  120. }
  121. .tab {
  122. width: 100%;
  123. display: inline-block;
  124. position: relative;
  125. text-align: center;
  126. color: @base_color;
  127. cursor: pointer;
  128. background: #E5E8EE;
  129. border-radius: 4px 4px 0px 0px;
  130. overflow: hidden;
  131. }
  132. .tab::after {
  133. content: '';
  134. width: 0;
  135. height: 4px;
  136. background: @theme_color;
  137. transform: translateX(-50%);
  138. position: absolute;
  139. top: 0;
  140. left: 50%;
  141. }
  142. .tab:hover,
  143. .tab.active {
  144. color: @theme_color;
  145. background: #fff;
  146. }
  147. .tab:hover::after,
  148. .tab.active::after {
  149. width: 100%;
  150. }
  151. }
  152. .tabs.division.theme {
  153. .tab {
  154. color: #A7A7B7;
  155. background: #ECEDEE;
  156. }
  157. .tab::after {
  158. display: none;
  159. }
  160. .tab:hover,
  161. .tab.active {
  162. color: #fff;
  163. background: @theme_color;
  164. }
  165. }