124 lines
2.1 KiB
Plaintext
124 lines
2.1 KiB
Plaintext
/* custom-tab-bar — 三端固定,全宽 Tab 胶囊 */
|
|
|
|
.custom-tab-bar {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 9999;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: flex-end;
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
background: transparent;
|
|
}
|
|
|
|
.bar-row {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 15rpx;
|
|
padding: 0 24rpx;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.tab-capsule {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
height: 100rpx;
|
|
background: #000000;
|
|
border-radius: 50rpx;
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.8);
|
|
padding: 0 20rpx;
|
|
position: relative;
|
|
}
|
|
|
|
.tab-capsule::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 60%;
|
|
height: 100%;
|
|
background: linear-gradient(
|
|
90deg,
|
|
transparent 0%,
|
|
rgba(255, 255, 255, 0.25) 20%,
|
|
rgba(255, 255, 255, 0.35) 50%,
|
|
rgba(255, 255, 255, 0.25) 80%,
|
|
transparent 100%
|
|
);
|
|
animation: shine 3s infinite;
|
|
z-index: 1;
|
|
}
|
|
|
|
@keyframes shine {
|
|
0% { left: -100%; }
|
|
25% { left: 150%; }
|
|
100% { left: 150%; }
|
|
}
|
|
|
|
.tab-item {
|
|
position: relative;
|
|
z-index: 2;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 70rpx;
|
|
}
|
|
|
|
.tab-icon {
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
margin-bottom: 4rpx;
|
|
filter: brightness(0) invert(1);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.tab-text {
|
|
font-size: 20rpx;
|
|
color: #aaa;
|
|
z-index: 2;
|
|
}
|
|
|
|
.active .tab-icon {
|
|
opacity: 1;
|
|
filter: brightness(0) invert(1) drop-shadow(0 0 8rpx #00aaff);
|
|
}
|
|
|
|
.active .tab-text {
|
|
color: #00aaff;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.badge-container {
|
|
position: absolute;
|
|
top: -10rpx;
|
|
right: -15rpx;
|
|
z-index: 100;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.tab-badge {
|
|
min-width: 36rpx;
|
|
height: 36rpx;
|
|
line-height: 36rpx;
|
|
padding: 0 10rpx;
|
|
background: #ff3b30;
|
|
color: #fff;
|
|
font-size: 22rpx;
|
|
font-weight: bold;
|
|
border-radius: 36rpx;
|
|
text-align: center;
|
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.3);
|
|
border: 1rpx solid rgba(255, 255, 255, 0.4);
|
|
}
|
|
|
|
page {
|
|
padding-bottom: 100rpx;
|
|
}
|