index.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. }
  18. .tab::after {
  19. content: '';
  20. width: 0;
  21. height: 4px;
  22. background: @theme_color;
  23. transform: translateX(-50%);
  24. transition: all 0.25s;
  25. position: absolute;
  26. bottom: 0;
  27. left: 50%;
  28. }
  29. .tab:hover,
  30. .tab.active {
  31. color: @theme_color;
  32. }
  33. .tab:hover::after,
  34. .tab.active::after {
  35. width: 100%;
  36. }
  37. }
  38. .tabs.card {
  39. display: flex;
  40. text-align: center;
  41. height: 44px;
  42. line-height: 44px;
  43. background: @theme_bg_color;
  44. a {
  45. display: inline-block;
  46. flex: 1;
  47. }
  48. .tab {
  49. width: 100%;
  50. display: inline-block;
  51. position: relative;
  52. text-align: center;
  53. color: @base_color;
  54. }
  55. .tab::after {
  56. content: '';
  57. width: 0;
  58. height: 4px;
  59. background: @theme_color;
  60. transform: translateX(-50%);
  61. position: absolute;
  62. top: 0;
  63. left: 50%;
  64. }
  65. .tab:hover,
  66. .tab.active {
  67. color: @theme_color;
  68. background: #fff;
  69. }
  70. .tab:hover::after,
  71. .tab.active::after {
  72. width: 100%;
  73. }
  74. }
  75. .tabs.text {
  76. height: 44px;
  77. line-height: 44px;
  78. padding-left: 44px;
  79. background: #fff;
  80. .tab {
  81. display: inline-block;
  82. position: relative;
  83. text-align: center;
  84. color: @base_color;
  85. margin: 0 13px;
  86. }
  87. .tab::after {
  88. content: '';
  89. width: 1px;
  90. height: 20px;
  91. background: @line_color;
  92. position: absolute;
  93. top: 12px;
  94. right: -13px;
  95. }
  96. .tab:hover,
  97. .tab.active {
  98. color: @theme_color;
  99. }
  100. a:nth-last-child(1) {
  101. .tab::after {
  102. display: none;
  103. }
  104. }
  105. }