index.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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:hover,
  160. .tab.active {
  161. color: @theme_color;
  162. }
  163. a:nth-last-child(1) {
  164. .tab::after {
  165. display: none;
  166. }
  167. }
  168. }
  169. .tabs.division {
  170. text-align: center;
  171. .tabs-warpper {
  172. display: flex;
  173. }
  174. a {
  175. display: inline-block;
  176. flex: 1;
  177. width: 100%;
  178. padding: 0 5px;
  179. }
  180. .tab {
  181. width: 100%;
  182. display: inline-block;
  183. position: relative;
  184. text-align: center;
  185. color: @base_color;
  186. cursor: pointer;
  187. background: #E5E8EE;
  188. border-radius: 4px 4px 0px 0px;
  189. overflow: hidden;
  190. }
  191. .tab::after {
  192. content: '';
  193. width: 0;
  194. height: 4px;
  195. background: @theme_color;
  196. transform: translateX(-50%);
  197. position: absolute;
  198. top: 0;
  199. left: 50%;
  200. }
  201. .tab:hover,
  202. .tab.active {
  203. color: @theme_color;
  204. background: #fff;
  205. }
  206. .tab:hover::after,
  207. .tab.active::after {
  208. width: 100%;
  209. }
  210. }
  211. .tabs.division.theme {
  212. .tab {
  213. color: #A7A7B7;
  214. background: #ECEDEE;
  215. }
  216. .tab::after {
  217. display: none;
  218. }
  219. .tab:hover,
  220. .tab.active {
  221. color: #fff;
  222. background: @theme_color;
  223. }
  224. }
  225. .tabs.division.gray {
  226. .tab {
  227. color: #A7A7B7;
  228. background: #ECEDEE;
  229. }
  230. .tab::after {
  231. display: none;
  232. }
  233. .tab:hover,
  234. .tab.active {
  235. color: #fff;
  236. background: #989FC1;
  237. }
  238. }