/* header 样式 */ .header { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 5% 0 2%; gap: 20px; background-color: #2D6B7D; } .header .logo { display: flex; flex: 1 1 auto; max-width: 55%; min-width: 0; align-items: center; margin: 0; border-radius: 20px; font-size: 120%; font-weight: 700; } .header .logo img { height: 80px; width: auto; object-fit: contain; display: block; } .header .logo .title { margin-left: 2%; width: auto; display: flex; flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; overflow: hidden; } .header .logo .title h3 { font-size: 110%; color: white; font-weight: 600; margin: 0; white-space: normal; line-height: 1.2; } .header .logo .title p { font-size: 80%; color: white; margin: 0; white-space: normal; line-height: 1.2; } .header .nev { flex: 0 1 auto; height: 100%; min-width: 0; } .header .nev .nev-child-1 { display: flex; width: 100%; height: 100%; justify-content: flex-end; align-items: center; } .header .nev-child-1 li { padding: 1% 2%; border-radius: 10px; position: relative; list-style: none; } /* 鼠标悬停导航栏 */ .header li:hover a { color: black; } .header .icon-jiantou_shang { display: none; } .header li:hover .icon-jiantou_xia { display: none; } .header li:hover .icon-jiantou_shang { display: inline-block; } /* 箭头图标对齐样式 */ .header .icon-jiantou_xia, .header .icon-jiantou_shang { font-size: 12px; vertical-align: middle; line-height: 1; margin-left: 4px; } .header a { font-size: 150%; font-weight: 700; color: white; display: inline-flex; align-items: center; gap: 5px; } /* 当前页面高亮样式,配合JS使用 */ .header a.active-link { color: black !important; } .header .nev-child-2 { display: none; position: absolute; top: 70%; left: 50%; transform: translateX(-50%) translateY(-10px); background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 100%); border-radius: 12px; box-shadow: 0 12px 35px rgba(46, 90, 97, 0.2); border: 1px solid rgba(46, 90, 97, 0.08); overflow: hidden; z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); margin-top: 8px; min-width: 200px; } /* 下拉菜单顶部小箭头 */ .header .nev-child-2::before { content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid #ffffff; filter: drop-shadow(0 -2px 4px rgba(46, 90, 97, 0.1)); } .header .nev-child-2 li { width: 100%; background-color: transparent; text-align: left; border-bottom: 1px solid rgba(46, 90, 97, 0.08); font-weight: 400; transition: all 0.2s ease; } .header .nev-child-2 li:nth-last-child(1) { border-bottom: none; } .header .nev-child-2 li a { display: flex; align-items: center; padding: 14px 10px; color: #2E5A61; text-decoration: none; font-size: 100%; font-weight: 500; position: relative; transition: all 0.2s ease; white-space: nowrap; } .header .nev-child-2 li a:before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 0; z-index: -1; } .header .nev-child-2 li:hover { background-color: rgba(71, 183, 190, 0.05); transform: translateX(3px); } .header .nev-child-2 li:hover a { color: #2E5A61; } .header .nev-child-2 li:hover a:before { width: 4px; } /* 每个菜单项的特色样式 */ .header .nev-child-2 li:nth-child(1):hover { background: linear-gradient(90deg, rgba(255, 193, 7, 0.1), transparent); } .header .nev-child-2 li:nth-child(2):hover { background: linear-gradient(90deg, rgba(220, 53, 69, 0.1), transparent); } .header .nev-child-2 li:nth-child(3):hover { background: linear-gradient(90deg, rgba(255, 87, 34, 0.1), transparent); } .header .nev-child-2 li:nth-child(4):hover { background: linear-gradient(90deg, rgba(76, 175, 80, 0.1), transparent); } .header .nev-child-2 li:nth-child(5):hover { background: linear-gradient(90deg, rgba(156, 39, 176, 0.1), transparent); } /* 菜单项动画序列 */ .header li:hover .nev-child-2 li { animation: slideInFromLeft 0.3s ease forwards; opacity: 0; transform: translateX(-20px); } .header li:hover .nev-child-2 li:nth-child(1) { animation-delay: 0.1s; } .header li:hover .nev-child-2 li:nth-child(2) { animation-delay: 0.15s; } .header li:hover .nev-child-2 li:nth-child(3) { animation-delay: 0.2s; } .header li:hover .nev-child-2 li:nth-child(4) { animation-delay: 0.25s; } .header li:hover .nev-child-2 li:nth-child(5) { animation-delay: 0.3s; } @keyframes slideInFromLeft { to { opacity: 1; transform: translateX(0); } } /* 下拉菜单显示动画 */ .header li:hover .nev-child-2 { display: block; opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); } /* Footer 样式 */ .copyright { width: 100%; margin: 0 auto; margin-bottom: 0px; /* 修改:如果是在最底部,可以去掉margin-bottom */ } .copyright .bottom { display: flex; justify-content: center; align-items: center; width: 100%; margin: 0 auto; padding-top: 40px; padding-bottom: 40px; background-color: #1E3A4A; } .copyright .bottom p { margin: 0 20px; color: white; } /* Header 响应式设计 */ @media (max-width: 1550px) { .header { gap: 15px; } .header .logo { max-width: 50%; } .header .logo img { height: 75px; } .header .logo .title { margin-left: 1.5%; } .header .logo .title h3 { font-size: 105%; } .header .logo .title p { font-size: 75%; } .header .nev-child-1 { gap: 12px; } .header .nev-child-1 li { padding: 1% 1.5%; } .header a { font-size: 130%; } } @media (max-width: 1350px) { .header .logo { max-width: 48%; } .header .logo img { height: 70px; } .header .logo .title h3 { font-size: 100%; } .header .logo .title p { font-size: 70%; } .header .nev-child-1 { gap: 10px; } .header a { font-size: 120%; } } @media (max-width: 1200px) { .header { flex-wrap: wrap; gap: 15px; } .header .logo { max-width: 45%; } .header .logo img { height: 65px; } .header .logo .title { margin-left: 10px; } .header .logo .title h3 { font-size: 95%; } .header .logo .title p { font-size: 68%; } .header .nev-child-1 { gap: 8px; } .header .nev-child-1 li { padding: 1% 1.2%; } .header a { font-size: 110%; } /* 调整下拉菜单定位 */ .header .nav-tools .tools-dropdown, .header .nav-help .help-dropdown { left: 50%; } } @media (max-width: 992px) { .header { flex-direction: column; align-items: center; gap: 15px; } .header .logo { max-width: 90%; justify-content: center; } .header .nev { width: 100%; } .header .nev-child-1 { justify-content: center; flex-wrap: wrap; gap: 12px; } } @media (max-width: 768px) { .header .logo { max-width: 100%; } .header .logo img { height: 60px; } .header .logo .title h3 { font-size: 90%; } .header .logo .title p { font-size: 70%; } .header .nev-child-1 li { padding: 8px 15px; } .header a { font-size: 110%; } .copyright .bottom { flex-direction: column; gap: 10px; padding: 15px 0; } .copyright .bottom p { margin: 0; text-align: center; font-size: 14px; } } @media (max-width: 480px) { .header .logo img { height: 50px; } .header .logo .title h3 { font-size: 85%; } .header .logo .title p { display: none; } .header .nev-child-1 { gap: 8px; } .header .nev-child-1 li { padding: 6px 10px; } .header a { font-size: 100%; } }