119 lines
2.4 KiB
Plaintext
119 lines
2.4 KiB
Plaintext
.tab-bar {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 100rpx;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
display: flex;
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
box-shadow: 0 -4rpx 20rpx rgba(102, 126, 234, 0.3);
|
|
z-index: 9999;
|
|
}
|
|
|
|
.tab-item {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.tab-item.active {
|
|
transform: translateY(-10rpx);
|
|
}
|
|
|
|
/* Emoji图标 */
|
|
.tab-emoji {
|
|
font-size: 44rpx;
|
|
line-height: 1;
|
|
margin-bottom: 4rpx;
|
|
transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
filter: grayscale(100%) brightness(1.2) opacity(0.5);
|
|
}
|
|
|
|
.tab-item.active .tab-emoji {
|
|
filter: grayscale(0%) brightness(1.3) opacity(1) drop-shadow(0 0 12rpx rgba(255, 255, 255, 0.8));
|
|
transform: scale(1.25);
|
|
}
|
|
|
|
/* 弹跳动画 */
|
|
.emoji-bounce {
|
|
animation: emoji-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
}
|
|
|
|
@keyframes emoji-bounce {
|
|
0%, 100% {
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
transform: scale(1.35);
|
|
}
|
|
}
|
|
|
|
/* 文字标签 */
|
|
.tab-text {
|
|
font-size: 20rpx;
|
|
line-height: 1;
|
|
font-weight: 500;
|
|
transition: all 0.3s ease;
|
|
opacity: 0.7;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.tab-item.active .tab-text {
|
|
opacity: 1;
|
|
font-weight: 700;
|
|
color: #FFFFFF;
|
|
text-shadow: 0 0 15rpx rgba(255, 255, 255, 0.8),
|
|
0 2rpx 8rpx rgba(0, 0, 0, 0.3);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* 选中指示器 */
|
|
.tab-indicator {
|
|
position: absolute;
|
|
bottom: 0;
|
|
width: 50rpx;
|
|
height: 8rpx;
|
|
background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
|
|
border-radius: 4rpx 4rpx 0 0;
|
|
box-shadow: 0 0 20rpx rgba(255, 255, 255, 0.8),
|
|
0 -2rpx 10rpx rgba(255, 255, 255, 0.5);
|
|
animation: indicator-slide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
@keyframes indicator-slide {
|
|
from {
|
|
width: 0;
|
|
opacity: 0;
|
|
transform: scaleX(0);
|
|
}
|
|
to {
|
|
width: 50rpx;
|
|
opacity: 1;
|
|
transform: scaleX(1);
|
|
}
|
|
}
|
|
|
|
/* 点击波纹效果 */
|
|
.tab-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 0;
|
|
height: 0;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
transform: translate(-50%, -50%);
|
|
transition: width 0.6s, height 0.6s;
|
|
}
|
|
|
|
.tab-item:active::before {
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
}
|