refactor: 将移动端汉堡菜单图标从CSS样式实现更改为SVG图片。
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-12-26 14:45:53 +08:00
parent e0dfd3e56a
commit 9ea0ccce53
3 changed files with 28 additions and 63 deletions

View File

@@ -3001,35 +3001,23 @@ html {
/* 汉堡菜单按钮样式 - 放在左侧order: 3 */
#index .mobile-menu-toggle {
display: flex !important;
flex-direction: column;
gap: 5px;
gap: 0;
cursor: pointer;
width: 24px;
height: 20px;
height: 24px;
justify-content: center;
align-items: center;
margin-right: 0;
order: 3;
padding: 0;
background: none;
border: none;
}
#index .mobile-menu-toggle span {
#index .mobile-menu-toggle .mobile-menu-icon {
width: 100%;
height: 2px;
background: #E5E7EB;
border-radius: 1px;
transition: all 0.3s ease;
}
#index .mobile-menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(8px, 8px);
}
#index .mobile-menu-toggle.active span:nth-child(2) {
opacity: 0;
}
#index .mobile-menu-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(8px, -8px);
height: 100%;
display: block;
}
/* ===== Banner 区域 - 大幅缩小 ===== */
@@ -3568,38 +3556,27 @@ html {
height: 12px !important;
}
/* 汉堡菜单按钮样式 - 放在左侧order: 3 */
/* 汉堡菜单按钮样式 - 放在左侧order: 3 */
#index .mobile-menu-toggle {
display: flex !important;
flex-direction: column;
gap: 5px;
gap: 0;
cursor: pointer;
width: 24px;
height: 20px;
height: 24px;
justify-content: center;
align-items: center;
margin-right: 0;
order: 3;
padding: 0;
background: none;
border: none;
}
#index .mobile-menu-toggle span {
#index .mobile-menu-toggle .mobile-menu-icon {
width: 100%;
height: 2px;
background: #E5E7EB;
border-radius: 1px;
transition: all 0.3s ease;
}
#index .mobile-menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(8px, 8px);
}
#index .mobile-menu-toggle.active span:nth-child(2) {
opacity: 0;
}
#index .mobile-menu-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(8px, -8px);
height: 100%;
display: block;
}
/* ===== Banner ===== */
@@ -4079,38 +4056,27 @@ html {
height: 10px !important;
}
/* 汉堡菜单按钮样式 - 放在左侧order: 3 */
/* 汉堡菜单按钮样式 - 放在左侧order: 3 */
#index .mobile-menu-toggle {
display: flex !important;
flex-direction: column;
gap: 4px;
gap: 0;
cursor: pointer;
width: 20px;
height: 18px;
height: 20px;
justify-content: center;
align-items: center;
margin-right: 0;
order: 3;
padding: 0;
background: none;
border: none;
}
#index .mobile-menu-toggle span {
#index .mobile-menu-toggle .mobile-menu-icon {
width: 100%;
height: 2px;
background: #E5E7EB;
border-radius: 1px;
transition: all 0.3s ease;
}
#index .mobile-menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(7px, 7px);
}
#index .mobile-menu-toggle.active span:nth-child(2) {
opacity: 0;
}
#index .mobile-menu-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(7px, -7px);
height: 100%;
display: block;
}
/* ===== Banner - 极简 ===== */