| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- /* 导航栏样式 */
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- margin: 0;
- padding: 0;
- overflow: hidden;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
- "Noto Sans", sans-serif;
- background: linear-gradient(135deg, #fdfcfb 0%, #f7f7f8 50%, #fdfcfb 100%);
- }
- /* 顶部导航栏容器 */
- .top-navigation {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 24px 20px;
- background: #ffffff;
-
- /* 非常明显的底部边框 - 加粗加深 */
- border-bottom: 4px solid #8b5cf6;
-
- /* 增强的阴影效果 - 多层阴影营造更强的分隔感 */
- box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25),
- 0 3px 10px rgba(0, 0, 0, 0.12),
- 0 1px 3px rgba(0, 0, 0, 0.08);
-
- /* 添加上边框增强边界感 */
- border-top: 1px solid rgba(229, 231, 235, 0.8);
-
- /* 禁用文字选中 */
- user-select: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
-
- /* 固定定位,确保边框始终可见 */
- position: relative;
- z-index: 100;
- }
- /* 导航栏左侧区域(Logo) */
- .nav-left {
- display: flex;
- align-items: center;
- gap: 12px;
- flex: 0 0 auto;
- }
- /* Logo样式 */
- .nav-logo {
- height: 40px;
- width: auto;
- object-fit: contain;
- }
- /* 标题样式 */
- .nav-title {
- font-size: 18px;
- font-weight: 600;
- color: #1f2937;
- letter-spacing: 0.5px;
- }
- /* 导航栏中间区域(导航按钮) */
- .nav-center {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 16px;
- flex: 1;
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- }
- /* 导航栏右侧区域(登录注册按钮) */
- .nav-right {
- display: flex;
- align-items: center;
- gap: 12px;
- flex: 0 0 auto;
- }
- /* 导航按钮 */
- .nav-btn {
- padding: 12px 32px;
- font-size: 15px;
- font-weight: 600;
- color: #6b7280;
- background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
- border: 2px solid #e5e7eb;
- border-radius: 12px;
- cursor: pointer;
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
- outline: none;
- user-select: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
- letter-spacing: 0.3px;
- }
- .nav-btn:hover {
- color: #8b5cf6;
- border-color: #8b5cf6;
- background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
- transform: translateY(-2px);
- box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
- }
- .nav-btn.active {
- color: #ffffff;
- background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
- border-color: transparent;
- box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
- transform: translateY(-2px);
- }
- .nav-btn.active:hover {
- background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
- box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5), 0 3px 10px rgba(0, 0, 0, 0.15);
- }
- /* 登录注册按钮 */
- .auth-btn {
- padding: 10px 24px;
- font-size: 14px;
- font-weight: 600;
- border-radius: 8px;
- cursor: pointer;
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
- outline: none;
- user-select: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- border: 2px solid transparent;
- letter-spacing: 0.3px;
- }
- .login-btn {
- color: #6b7280;
- background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
- border-color: #e5e7eb;
- }
- .login-btn:hover {
- color: #8b5cf6;
- border-color: #8b5cf6;
- background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
- transform: translateY(-2px);
- box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
- }
- .register-btn {
- color: #ffffff;
- background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
- border-color: transparent;
- box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
- }
- .register-btn:hover {
- background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
- transform: translateY(-2px);
- box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
- }
- /* 用户头像容器 */
- .user-avatar-container {
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
- }
- .user-avatar {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- object-fit: cover;
- border: 2px solid #8b5cf6;
- box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
- }
- .user-avatar:hover {
- transform: scale(1.1);
- box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
- border-color: #7c3aed;
- }
- /* 响应式设计 */
- @media (max-width: 768px) {
- .top-navigation {
- padding: 16px 12px;
- }
- .nav-center {
- gap: 12px;
- }
- .nav-btn {
- padding: 10px 24px;
- font-size: 14px;
- }
- .nav-right {
- gap: 8px;
- }
- .auth-btn {
- padding: 8px 16px;
- font-size: 13px;
- }
- }
- @media (max-width: 480px) {
- .top-navigation {
- padding: 12px 8px;
- }
- .nav-center {
- gap: 8px;
- }
- .nav-btn {
- padding: 8px 16px;
- font-size: 13px;
- }
- .nav-right {
- gap: 6px;
- }
- .auth-btn {
- padding: 6px 12px;
- font-size: 12px;
- }
- }
|