navbar adjust

This commit is contained in:
CakeCN
2025-12-13 21:47:10 +08:00
parent 8e79380ba4
commit d0331d9361
2 changed files with 55 additions and 4 deletions

View File

@@ -3,13 +3,28 @@
background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 0.8rem 1rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.navbar .logo h1 {
color: rgb(245, 245, 245);
font-size: 24px;
font-size: 18px;
font-weight: bold;
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 300px;
}
.navbar-links {
display: flex;
justify-content: center;
flex: 1;
margin: 0 20px;
}
.navbar-links a {
@@ -69,4 +84,41 @@
/* 下拉浮框 hover 显示 */
.dropdown:hover .dropdown-content {
display: block;
}
/* 响应式设计 */
@media (max-width: 768px) {
.navbar {
flex-direction: column;
gap: 1rem;
}
.navbar-links {
margin: 0;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem;
}
.navbar-links a {
margin: 0 0.75rem;
font-size: 16px;
}
.navbar .logo h1 {
font-size: 16px;
max-width: 250px;
}
}
@media (max-width: 480px) {
.navbar .logo h1 {
font-size: 14px;
max-width: 200px;
}
.navbar-links a {
margin: 0 0.5rem;
font-size: 14px;
}
}