index.less 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. @import '../../app.less';
  2. .tabs {
  3. height: 44px;
  4. line-height: 44px;
  5. overflow: hidden;
  6. }
  7. .tabs.small {
  8. height: 32px;
  9. line-height: 32px;
  10. }
  11. .tabs.border {
  12. border-bottom: 1px solid #eee;
  13. }
  14. .tabs.line {
  15. text-align: center;
  16. background: #fff;
  17. .tab {
  18. display: inline-block;
  19. position: relative;
  20. text-align: center;
  21. color: @base_color;
  22. width: 120px;
  23. margin: 0 30px;
  24. cursor: pointer;
  25. }
  26. .tab::after {
  27. content: '';
  28. width: 0;
  29. height: 4px;
  30. background: @theme_color;
  31. transform: translateX(-50%);
  32. transition: all 0.25s;
  33. position: absolute;
  34. bottom: 0;
  35. left: 50%;
  36. }
  37. .tab:hover,
  38. .tab.active {
  39. color: @theme_color;
  40. }
  41. .tab:hover::after,
  42. .tab.active::after {
  43. width: 100%;
  44. }
  45. }
  46. .tabs.line.small {
  47. .tab {
  48. margin: 0;
  49. }
  50. .tab::after {
  51. height: 3px;
  52. }
  53. }
  54. .tabs.card {
  55. text-align: center;
  56. background: @theme_bg_color;
  57. .tabs-warpper {
  58. display: flex;
  59. a {
  60. display: inline-block;
  61. flex: 1;
  62. }
  63. }
  64. .tab {
  65. width: 100%;
  66. display: inline-block;
  67. position: relative;
  68. text-align: center;
  69. color: @base_color;
  70. cursor: pointer;
  71. }
  72. .tab::after {
  73. content: '';
  74. width: 0;
  75. height: 4px;
  76. background: @theme_color;
  77. transform: translateX(-50%);
  78. position: absolute;
  79. top: 0;
  80. left: 50%;
  81. }
  82. .tab:hover,
  83. .tab.active {
  84. color: @theme_color;
  85. background: #fff;
  86. }
  87. .tab:hover::after,
  88. .tab.active::after {
  89. width: 100%;
  90. }
  91. }
  92. .tabs.tag {
  93. line-height: 24px;
  94. .tabs-warpper {
  95. a {
  96. display: inline-block;
  97. }
  98. }
  99. .tab {
  100. padding: 0 20px;
  101. display: inline-block;
  102. position: relative;
  103. text-align: center;
  104. color: #fff;
  105. cursor: pointer;
  106. background: #B9C1C9;
  107. border-radius: 12px;
  108. }
  109. .tab:hover,
  110. .tab.active {
  111. background: @theme_color;
  112. }
  113. }
  114. .tabs.tag.white {
  115. .tab {
  116. background: #fff;
  117. color: #8897A8;
  118. border: 1px solid #8897A8;
  119. }
  120. .tab:hover,
  121. .tab.active {
  122. background: @theme_color;
  123. border: 1px solid @theme_color;
  124. color: #fff;
  125. }
  126. }
  127. .tabs.tag.small {
  128. height: 40px;
  129. overflow: hidden;
  130. .tabs-warpper {
  131. padding: 8px 0;
  132. }
  133. .tab {
  134. line-height: 22px;
  135. font-size: 12px;
  136. padding: 0 5px;
  137. }
  138. }
  139. .tabs.text {
  140. padding-left: 44px;
  141. background: #fff;
  142. .tab {
  143. display: inline-block;
  144. position: relative;
  145. text-align: center;
  146. color: @base_color;
  147. margin: 0 13px;
  148. cursor: pointer;
  149. }
  150. .tab::after {
  151. content: '';
  152. width: 1px;
  153. height: 20px;
  154. background: @line_color;
  155. position: absolute;
  156. top: 12px;
  157. right: -13px;
  158. }
  159. .tab:last-child::after {
  160. display: none;
  161. }
  162. .tab:hover,
  163. .tab.active {
  164. color: @theme_color;
  165. }
  166. a:nth-last-child(1) {
  167. .tab::after {
  168. display: none;
  169. }
  170. }
  171. }
  172. .tabs.division {
  173. text-align: center;
  174. .tabs-warpper {
  175. display: flex;
  176. }
  177. a {
  178. display: inline-block;
  179. flex: 1;
  180. width: 100%;
  181. padding: 0 5px;
  182. }
  183. .tab {
  184. width: 100%;
  185. display: inline-block;
  186. position: relative;
  187. text-align: center;
  188. color: @base_color;
  189. cursor: pointer;
  190. background: #E5E8EE;
  191. border-radius: 4px 4px 0px 0px;
  192. overflow: hidden;
  193. }
  194. .tab::after {
  195. content: '';
  196. width: 0;
  197. height: 4px;
  198. background: @theme_color;
  199. transform: translateX(-50%);
  200. position: absolute;
  201. top: 0;
  202. left: 50%;
  203. }
  204. .tab:hover,
  205. .tab.active {
  206. color: @theme_color;
  207. background: #fff;
  208. }
  209. .tab:hover::after,
  210. .tab.active::after {
  211. width: 100%;
  212. }
  213. }
  214. .tabs.division.theme {
  215. .tab {
  216. color: #A7A7B7;
  217. background: #ECEDEE;
  218. }
  219. .tab::after {
  220. display: none;
  221. }
  222. .tab:hover,
  223. .tab.active {
  224. color: #fff;
  225. background: @theme_color;
  226. }
  227. }
  228. .tabs.division.gray {
  229. .tab {
  230. color: #A7A7B7;
  231. background: #ECEDEE;
  232. }
  233. .tab::after {
  234. display: none;
  235. }
  236. .tab:hover,
  237. .tab.active {
  238. color: #fff;
  239. background: #989FC1;
  240. }
  241. }