CustomTabBar.wxss
1.19 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
/* components/TabBar/TabBar.wxss */
.tab-bar{
position: fixed;
left: 0;
background-color: #fff;
z-index: 99;
width: 100%;
height: var(--fontSize100);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize20);
animation: show-tab-bar .5s forwards;
border-top: var(--fontSize1) solid #F4F4F5;
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.tab-bar .item{
flex: 1;
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: all .5s;
}
.tab-bar .item .icon-box{
width: var(--fontSize48);
height: var(--fontSize48);
margin-bottom: var(--fontSize8);
}
.tab-bar .item .icon-box .active-icon{
animation: showicon .5s forwards;
}
@keyframes show-tab-bar {
0%{
bottom: -100%;
}
100%{
bottom: 0;
}
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.tab-bar{
height: var(--fontSize70);
font-size: var(--fontSize16);
}
.tab-bar .item .icon-box{
width: var(--fontSize32);
height: var(--fontSize32);
margin-bottom: var(--fontSize4);
}
}