Commit b2d187d230399eca0b0ac02877e57b7db5659dfa

Authored by zhiyangdu
1 parent 77fb5b57

tab样式优化

src/components/tabBox/tabBox.less
1 -.main-box {  
2 - .tabs-box {  
3 - padding-top: 30px;  
4 - padding-bottom: 30px;  
5 - width: 750px;  
6 - height: auto;  
7 - &.bg-white {  
8 - background-color: #ffffff;  
9 - }  
10 - &.bg-excessive-color {  
11 - background: linear-gradient(90deg, rgba(255, 246, 248, 1) 0%, rgba(255, 233, 239, 1) 100%);  
12 - }  
13 - .box {  
14 - display: flex;  
15 - justify-content: space-around;  
16 - align-items: center;  
17 - margin: 0 auto;  
18 - width: 690px;  
19 - height: 100%;  
20 - .tab {  
21 - color: #B4B4B4;  
22 - font-size: 32px;  
23 - .line {  
24 - background-color: transparent;  
25 - margin: 8px auto 0 auto;  
26 - width: 40px;  
27 - height: 4px;  
28 - }  
29 - &.active {  
30 - color: #333333;  
31 - .line {  
32 - background-color: #FC1541;  
33 - width: 40px;  
34 - height: 4px;  
35 - }  
36 - }  
37 - }  
38 - } 1 +.tabBox {
  2 + // tab上线填充
  3 + .van-tabs--line .van-tabs__wrap{
  4 + padding: 30px 0;
  5 + height: auto !important;
39 } 6 }
40 - .tabs-swiper-box {  
41 - width: 750px;  
42 - height: auto;  
43 - .swipe {  
44 - width: 100%;  
45 - height: 100%;  
46 - .swipe-item {  
47 - width: 100%;  
48 - height: 100%;  
49 - .skeleton {  
50 - &.brief {  
51 - background-color: #ffffff;  
52 - }  
53 - &.boutique {  
54 - background: linear-gradient(90deg, rgba(255, 246, 248, 1) 0%, rgba(255, 233, 239, 1) 100%);  
55 - }  
56 - &.commodity {  
57 - background-color: #F9F9F9;  
58 - .column-commodity-excessive {  
59 - background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(249, 249, 249, 1) 100%);  
60 - width: 750px;  
61 - height: 30px;  
62 - }  
63 - }  
64 - }  
65 - }  
66 - } 7 + // tab标题颜色和字号
  8 + .van-tab{
  9 + color: #B4B4B4;
  10 + font-size: 32px;
  11 + }
  12 + // tab选中颜色
  13 + .van-tab--active{
  14 + color: #333333;
  15 + }
  16 + // 选中下划线
  17 + .van-tabs__line{
  18 + background-color: #FC1541;
  19 + width: 40px !important;
  20 + height: 4px;
  21 + top: 40px;
  22 + }
  23 + // tab边框
  24 + .van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after{
  25 + border-width: 0;
67 } 26 }
68 } 27 }