nav-mobile-tabs.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. :root {
  2. --nav-height: 72px;
  3. --primary-bg: #0f172a; // 深蓝底色
  4. --glass-bg: rgba(15, 23, 42, 0.85);
  5. --accent-color: #3b82f6; // 科技蓝
  6. --accent-glow: 0 0 10px rgba(59, 130, 246, 0.7);
  7. --text-primary: #e2e8f0;
  8. --text-secondary: #94a3b8;
  9. --transition-speed: 0.25s;
  10. }
  11. /* 科技感导航栏 */
  12. .tech-nav {
  13. position: fixed;
  14. bottom: 0;
  15. left: 0;
  16. right: 0;
  17. height: var(--nav-height);
  18. background: var(--glass-bg);
  19. backdrop-filter: blur(12px) saturate(180%);
  20. display: flex;
  21. justify-content: space-around;
  22. align-items: center;
  23. border-top: 1px solid rgba(255, 255, 255, 0.08);
  24. z-index: 1000;
  25. box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.3);
  26. padding: 0 16px;
  27. }
  28. .nav-item {
  29. display: flex;
  30. flex-direction: column;
  31. align-items: center;
  32. justify-content: center;
  33. width: 25%;
  34. height: 100%;
  35. color: var(--text-secondary);
  36. text-decoration: none;
  37. position: relative;
  38. transition: all var(--transition-speed) ease;
  39. overflow: hidden;
  40. &::before {
  41. content: '';
  42. position: absolute;
  43. top: -10px;
  44. left: 50%;
  45. transform: translateX(-50%);
  46. width: 40px;
  47. height: 40px;
  48. background: var(--accent-color);
  49. border-radius: 50%;
  50. opacity: 0;
  51. transition: all var(--transition-speed) ease;
  52. filter: blur(8px);
  53. }
  54. }
  55. .nav-icon {
  56. font-size: 20px;
  57. width: 44px;
  58. height: 44px;
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. border-radius: 12px;
  63. margin-bottom: 4px;
  64. transition: all var(--transition-speed) ease;
  65. position: relative;
  66. z-index: 1;
  67. background: rgba(255, 255, 255, 0.05);
  68. }
  69. .nav-label {
  70. font-size: 12px;
  71. font-weight: 500;
  72. transition: all var(--transition-speed) ease;
  73. position: relative;
  74. z-index: 1;
  75. }
  76. /* 活动状态样式 */
  77. .nav-item.active {
  78. color: var(--text-primary);
  79. .nav-icon {
  80. background: rgba(59, 130, 246, 0.2);
  81. box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
  82. transform: translateY(-6px);
  83. i {
  84. color: var(--accent-color);
  85. text-shadow: var(--accent-glow);
  86. }
  87. }
  88. .nav-label {
  89. transform: translateY(4px);
  90. font-weight: 600;
  91. }
  92. &::before {
  93. opacity: 0.3;
  94. top: -20px;
  95. }
  96. }
  97. /* 导航指示器 */
  98. .nav-indicator {
  99. position: absolute;
  100. top: -12px;
  101. left: 0;
  102. height: 4px;
  103. background: var(--accent-color);
  104. border-radius: 2px;
  105. transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  106. box-shadow: var(--accent-glow);
  107. z-index: 2;
  108. }
  109. /* 悬停效果 */
  110. @media (hover: hover) {
  111. .nav-item:hover:not(.active) {
  112. color: var(--text-primary);
  113. .nav-icon {
  114. transform: translateY(-2px);
  115. background: rgba(255, 255, 255, 0.1);
  116. }
  117. }
  118. }
  119. /* 点击反馈 */
  120. .nav-item:active {
  121. transform: scale(0.96);
  122. }