/* 整体tabBar容器 */ .tab-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 100rpx; background: #FFFFFF; display: flex; flex-direction: column; z-index: 9999; box-sizing: border-box; } /* 顶部边框线 */ .tab-bar-border { height: 1rpx; background-color: #E5E5E5; } /* tabBar内容容器 */ .tab-bar-content { flex: 1; display: flex; align-items: center; justify-content: space-around; padding: 0 20rpx; position: relative; } /* 普通tab项 */ .tab-bar-item { flex: 1; display: flex; justify-content: center; align-items: center; height: 100%; } /* 普通tab项内容 */ .tab-item-content { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; } /* 普通图标 */ .tab-icon { width: 44rpx; height: 44rpx; margin-bottom: 4rpx; } /* 普通文字 */ .tab-text { font-size: 20rpx; line-height: 1; } /* 特殊按钮容器 */ .special-item { position: relative; z-index: 2; } /* 特殊按钮整体 */ .special-button { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; position: relative; } /* 特殊按钮背景 */ .special-button-bg { width: 100rpx; height: 100rpx; border-radius: 50%; background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); display: flex; align-items: center; justify-content: center; position: relative; top: -20rpx; box-shadow: 0 4rpx 12rpx rgba(255, 165, 0, 0.3); border: 4rpx solid #FFFFFF; box-sizing: border-box; } /* 特殊按钮图标容器 */ .special-icon-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } /* 特殊按钮图标 */ .special-icon { width: 48rpx; height: 48rpx; } /* 特殊按钮文字 */ .special-text { font-size: 20rpx; line-height: 1; position: relative; top: -15rpx; margin-top: 4rpx; } /* 点击态效果 */ .tab-bar-item:active { background-color: rgba(0, 0, 0, 0.05); } .special-item:active .special-button-bg { transform: scale(0.95); box-shadow: 0 2rpx 8rpx rgba(255, 165, 0, 0.4); } /* 安全区域适配 */ @supports (bottom: env(safe-area-inset-bottom)) { .tab-bar { padding-bottom: env(safe-area-inset-bottom); height: calc(100rpx + env(safe-area-inset-bottom)); } } /* 兼容iPhone X等机型 */ @supports (bottom: constant(safe-area-inset-bottom)) { .tab-bar { padding-bottom: constant(safe-area-inset-bottom); height: calc(100rpx + constant(safe-area-inset-bottom)); } }