tabbar.wxss
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.tabbar {
height: 102rpx;
line-height: 102rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #eee;
background-color: #fff;
}
.flex {
display: flex;
}
.tabbar-item {
float: left;
margin-right: 80rpx;
font-size: 32rpx;
color: #333;
position: relative;
font-weight: 600;
}
.tabbar-item .item {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.flex .tabbar-item {
flex: 1;
text-align: center;
margin-right: 0;
}
.tabbar-item:last-of-type {
margin-right: 0;
}
.tabbar-item.active,.tabbar-line {
position: relative;
}
.tabbar-line:before {
content: "";
position: absolute;
top: 50%;
right: -1rpx;
transform: translateY(-50%);
width: 1rpx;
height: 62rpx;
background-color: hsla(0,0%,77.6%,.2);
}
.tabbar-item.active .item:after {
content: "";
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 4rpx;
background-color: #ff7d12;
}