运维小程序
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.wxss 1011B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* custom-tab-bar/index.wxss */
  2. /* 底部TabBar容器 */
  3. .tab-bar {
  4. position: fixed;
  5. bottom: 0;
  6. left: 0;
  7. right: 0;
  8. /* 基础高度 + 安全区域高度(适配苹果底部横条) */
  9. height: calc(80rpx + env(safe-area-inset-bottom));
  10. padding-bottom:calc(env(safe-area-inset-bottom) - 30rpx);
  11. background-color: #ffffff;
  12. border-top: 1px solid #eeeeee;
  13. display: flex;
  14. justify-content: space-around;
  15. align-items: center;
  16. z-index: 999;
  17. box-sizing: border-box; /* 确保padding不会撑开容器高度 */
  18. }
  19. /* 单个Tab项容器 */
  20. .tab-item {
  21. flex: 1;
  22. display: flex;
  23. flex-direction: column;
  24. align-items: center;
  25. justify-content: center;
  26. padding: 8rpx 0;
  27. }
  28. /* 图标样式 */
  29. .tab-item .icon {
  30. width: 50rpx;
  31. height: 50rpx;
  32. margin-bottom: 10rpx;
  33. display: block;
  34. }
  35. /* 文字样式 */
  36. .tab-item .text {
  37. font-size: 26rpx;
  38. color: #8a8a8a;
  39. line-height: 1;
  40. font-weight: 500;
  41. }
  42. .tab-item .text.active {
  43. color: #0F80DC; /* 选中颜色 */
  44. font-weight: 500;
  45. }