/* 自定义TabBar样式 */ .uni-tabbar { padding: 8px 0 4px 0; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); } .uni-tabbar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 0; min-height: 50px; } .uni-tabbar-item__icon { margin-bottom: 4px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; } .uni-tabbar-item__text { font-size: 12px; line-height: 1.2; text-align: center; margin-top: 2px; } /* 选中状态优化 */ .uni-tabbar-item--selected .uni-tabbar-item__text { font-weight: 500; } /* 图标和文字间距 */ .uni-tabbar-item__icon + .uni-tabbar-item__text { margin-top: 4px; } /* 整体间距优化 */ .uni-tabbar__list { display: flex; justify-content: space-around; align-items: center; padding: 0 20px; } /* 安全区域适配 */ @supports (padding-bottom: env(safe-area-inset-bottom)) { .uni-tabbar { padding-bottom: calc(4px + env(safe-area-inset-bottom)); } }