/* 全局样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; list-style: none; text-decoration: none; } body { padding-top: 70px; background-color: #F8F9FA; color: #000; line-height: 1.7; transition: background-color 0.3s, color 0.3s; } body.night-mode { background-color: #1D2129; color: #fff; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } /* 导航栏样式 */ .header { background-color: #000; position: fixed; top: 0; left: 0; right: 0; z-index: 99; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } body.night-mode .header { background-color: #181a1f; border-bottom-color: #373B41; box-shadow: 0 2px 8px rgba(0,0,0,0.8); } .nav { display: flex; justify-content: space-between; align-items: center; height: 70px; } /* 最终版logo样式:保留原始布局+系统手写字体 */ .logo { display: flex; align-items: center; gap: 10px; font-size: 40px; /* 恢复你原始的字体大小 */ color: #fff; font-weight: 700; /* 恢复你原始的字体权重 */ /* 系统内置手写字体,无在线加载 */ font-family: "Ma Shan Zheng", "华文行楷", "KaiTi", "Microsoft YaHei", sans-serif; /* 可选:轻微倾斜,不想加就删掉 */ transform: rotate(-1deg); } /* 恢复你原始的logo图片样式 */ .logo img{ width: 50px; height: 50px; border-radius: 4px; object-fit: cover; } .nav-list { display: flex; gap: 35px; } .nav-list a { color: #fff; font-size: 20px; transition: all 0.3s ease; padding: 8px 0; position: relative; } .nav-list a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: #165DFF; transition: width 0.3s ease; } .nav-list a:hover { color: #165DFF; } .nav-list a:hover::after { width: 100%; } body.night-mode .nav-list a { color: #e5e6eb; } body.night-mode .nav-list a:hover { color: #165DFF; } .nav-list .active{ color: #165DFF; font-size: 20px; transition: all 0.3s ease; padding: 8px 0; position: relative; } /* 二级下拉菜单样式 */ .has-submenu { position: relative; } .submenu { position: absolute; top: 100%; left: 0; background-color: #111; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.6); min-width: 140px; padding: 8px 0; opacity: 0; transform: translateY(-5px); pointer-events: none; z-index: 9999; transition: all 0.3s ease; } .has-submenu:hover>.submenu { display: block; opacity: 1; transform: translateY(0); pointer-events: auto; } .submenu li a { display: block; padding: 8px 16px; font-size: 14px; color: #e5e6eb; white-space: nowrap; } .submenu li .active { display: block; padding: 8px 16px; font-size: 14px; color: #165DFF; white-space: nowrap; } .submenu li a:hover { color: #165DFF; background-color: #222; } body.night-mode .submenu { background-color: #2C3036; box-shadow: 0 4px 12px rgba(0,0,0,0.8); } body.night-mode .submenu li a { color: #e5e6eb; } body.night-mode .submenu li a:hover { background-color: #373B41; color: #165DFF; } .submenu li a::after { display: none; } /* 主题切换+语言切换容器 */ .theme-lang-switch { display: flex; align-items: center; gap: 15px; position: relative; } .lang-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: #fff; transition: all 0.3s ease; width: 70px; } .sun { display: flex; flex-direction: column; align-items: center; cursor: pointer; color: #fff; transition: all 0.3s ease; width: 70px; } .lang-icon:hover { color: #6b6868; background-color: #97c6f5; margin-bottom: 7px; border-left:2px solid rgb(149, 141, 141); transition: all 0.3s ease; } .sun:hover{ color: #6b6868; background-color: #97c6f5; margin-bottom: 5px; border-right:2px solid rgb(149, 141, 141); border-left:2px solid rgb(149, 141, 141); transition: all 0.3s ease; } .lang-icon>.globe-icon{ margin-top: 10px; font-size: 25px; } .sun>.night-icon{ margin-top: 10px; font-size: 25px; } .light{ font-size: 12px; margin-bottom: 4px; letter-spacing: 2.6px; } .lang-text { font-size: 12px; margin-bottom: 4px; letter-spacing: 2.6px; } .lang-menu { position: absolute; top: 100%; right: 0; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); padding: 8px 0; min-width: 120px; display: none; z-index: 1000; transition: all 0.3s; } body.night-mode .lang-menu { background-color: #2C3036; box-shadow: 0 4px 16px rgba(0,0,0,0.5); } .lang-menu.show { display: block; animation: fadeIn 0.3s ease; } .lang-item { padding: 8px 16px; color: #000; cursor: pointer; transition: background-color 0.2s; } body.night-mode .lang-item { color: rgba(178, 178, 186, 0.612) } body.night-mode .lang-item.active { color: #ffffff; } .lang-item:hover { color: #c1bfbf; } body.night-mode .lang-item:hover { background-color: #373B41; } .lang-item.active { color: #1849bd; font-weight: 600; } /* 通用淡入动画 */ @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } } /* 固定在线咨询入口 */ .consult-fixed { position: fixed; right: 30px; bottom: 30px; background-color: #165DFF; color: #fff; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(22,93,255,0.2); cursor: pointer; z-index: 998; transition: all 0.3s; } .consult-fixed:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(22,93,255,0.3); } .consult-fixed span { font-size: 24px; } /* 底部样式 */ .footer { background-color: #1D2129; color: #86909C; padding: 50px 0 20px; } .footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 120px; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #2C3036; } .footer-sitemap { display: flex; gap: 60px; flex: 1; min-width: 300px; } .sitemap-column h4 { font-size: 16px; color: #fff; margin-bottom: 16px; font-weight: 500; } .sitemap-column a { font-size: 16px; color: #fff; margin-bottom: 16px; font-weight: 500; } .sitemap-column a:hover { font-size: 16px; color: #165DFF; margin-bottom: 16px; font-weight: 500; } .sitemap-column ul li { margin-bottom: 10px; } .sitemap-column ul li a { color: #86909C; font-size: 14px; transition: color 0.3s; } .sitemap-column ul li a:hover { color: #165DFF; } .footer-contact { flex: 0 0 250px; text-align: left; } .footer-contact h4 { font-size: 16px; color: #fff; margin-bottom: 16px; font-weight: 500; } .footer-email { font-size: 14px; color: #86909C; margin-bottom: 20px; } .qrcode-group { display: flex; flex-direction: column; gap: 16px; } .qrcode-item { display: flex; align-items: center; gap: 12px; } .qrcode-img { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; border: 1px solid #2C3036; } .qrcode-img img { width: 100%; height: 100%; object-fit: cover; } .qrcode-text { font-size: 14px; color: #86909C; } .footer-message { flex: 0 0 300px; background: #2C3036; border-radius: 8px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); } .message-title { font-size: 18px; color: #fff; margin-bottom: 20px; text-align: left; font-weight: 500; } .form-group { margin-bottom: 16px; } .form-group label { display: block; font-size: 14px; color: #fff; margin-bottom: 8px; } .form-group input, .form-group textarea { width: 100%; padding: 10px; background: #373B41; border: 1px solid #4E5969; border-radius: 4px; font-size: 14px; color: #fff; resize: none; } .form-group input::placeholder, .form-group textarea::placeholder { color: #a5aab0; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #165DFF; } .submit-btn { width: 100%; background-color: #165DFF; color: #fff; border: none; padding: 10px 0; border-radius: 4px; font-size: 14px; cursor: pointer; transition: background-color 0.3s; } .submit-btn:hover { background-color: #0E42D2; } .footer-brand { text-align: center; margin-bottom: 20px; } .footer-brand h2 { font-size: 60px; color: #fff; margin-bottom: 8px; font-weight: 700; } .footer-slogan { font-size: 16px; color: #86909C; letter-spacing: 1px; } .footer-bottom { text-align: center; font-size: 12px; line-height: 2; } .footer-bottom a { color: #86909C; margin: 0 8px; transition: color 0.3s; } .footer-bottom a:hover { color: #165DFF; } /* 移动端导航按钮基础样式 */ .mobile-nav-toggle { display: none; /* 桌面端隐藏 */ width: 30px; height: 30px; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; color: #fff; } .mobile-nav-toggle span { width: 100%; height: 2px; background-color: #fff; border-radius: 2px; transition: all 0.3s ease; } body.night-mode .mobile-nav-toggle span { background-color: #e5e6eb; } /* 移动端适配 - 优化版(核心改动) */ @media (max-width: 768px) { /* 1. 导航栏布局优化:防止logo/按钮挤压 */ .nav { position: relative; height: 70px; padding: 0 10px; /* 新增:左右内边距,避免内容贴边 */ } /* 2. Logo适配:缩小字体+取消倾斜,适配移动端 */ .logo { font-size: 25px; /* 移动端缩小logo字体 */ transform: none; /* 取消倾斜,避免移动端显示错位 */ z-index: 100; /* 保证logo不被遮挡 */ } .logo img { width: 40px; /* 移动端缩小logo图片 */ height: 40px; } /* 3. 汉堡菜单:优化位置+交互 */ .mobile-nav-toggle { display: flex !important; position: absolute; right: 80px; /* 调整位置,避免和语言按钮重叠 */ top: 50%; transform: translateY(-50%); /* 垂直居中,取消固定top */ z-index: 100; } /* 4. 语言+夜间模式按钮:优化布局,避免挤压 */ .theme-lang-switch { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: row; gap: 8px; /* 缩小间距,适配移动端 */ width: auto; } .lang-icon, .sun { width: auto; height: auto; flex-direction: column; align-items: center; justify-content: center; padding: 3px; /* 缩小内边距 */ } .lang-icon .globe-icon, .sun .night-icon { font-size: 18px; /* 缩小图标 */ margin: 0 0 2px 0; } .lang-text, .light { font-size: 10px; /* 缩小文字 */ letter-spacing: 1px; margin: 0; } /* 修复hover抖动问题 */ .lang-icon:hover, .sun:hover { margin: 0 !important; padding: 3px; } /* 5. 移动端导航列表:优化交互+样式 */ .nav-list { position: fixed; top: 70px; right: 0; width: 200px; /* 缩小宽度,适配小屏 */ height: calc(100vh - 70px); background-color: #000; flex-direction: column; gap: 0; padding: 15px 0; /* 缩小内边距 */ transform: translateX(100%); transition: transform 0.3s ease-out; /* 更顺滑的动画 */ z-index: 9998; box-shadow: -2px 0 10px rgba(0,0,0,0.5); display: flex !important; } .nav-list.show { transform: translateX(0); } body.night-mode .nav-list { background-color: #181a1f; } /* 移动端导航项:优化点击区域 */ .nav-list li { width: 100%; } .nav-list li a { display: block; /* 新增:扩大点击区域 */ padding: 12px 20px; /* 你原有样式 */ font-size: 15px; /* 你原有样式 */ } /* 移动端二级菜单:适配侧边栏 */ .has-submenu .submenu { position: static; /* 改为静态定位,显示在下方 */ width: 100%; background-color: #131313; box-shadow: none; padding: 0; margin-left: 15px; /* 缩进显示 */ /* 关键:默认隐藏,点击后显示 */ display: none; opacity: 1; transform: none; pointer-events: auto; } body.night-mode .has-submenu .submenu { background-color: #25272e; } .has-submenu .submenu li a { padding: 8px 15px; font-size: 13px; } /* 6. 语言菜单位置:优化避免超出屏幕 */ .lang-menu { top: 50px; right: 0; min-width: 100px; /* 缩小宽度 */ } /* 7. 底部样式优化(保留你的原有代码,仅微调) */ .footer-contact { flex: 0 0 250px; text-align: center; margin:0 auto; } .footer-container { gap: 20px; /* 缩小间距,适配移动端 */ padding-bottom: 20px; } .footer-sitemap { gap: 30px; /* 缩小间距 */ margin: 0 auto; justify-content: center; flex: 1; } .qrcode-group { flex-direction: row; /* 二维码横向排列,适配移动端 */ flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; } .footer-message { flex: 0 0 90%; /* 表单宽度适配屏幕 */ margin: 0 auto; padding: 15px; } } /* 咨询入口的样式 */ .form-mask { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.5); z-index: 100; display: none; opacity: 0; transition: opacity 0.3s ease; } .form-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 90%; /* 移动端表单宽度适配 */ max-width: 400px; /* 最大宽度限制 */ background-color: #fff; border-radius: 8px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); padding: 20px; z-index: 101; display: none; opacity: 0; transition: all 0.3s ease-in-out; } .form-mask.show { display: block; opacity: 1; } .form-modal.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); } .form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; } .form-header h3 { margin: 0; font-size: 18px; color: #333; } .close-modal-btn { background: transparent; border: none; font-size: 20px; color: #999; cursor: pointer; width: 30px; height: 30px; line-height: 30px; text-align: center; } .close-modal-btn:hover { color: #ff0000; } .form-item { margin-bottom: 16px; } .form-item label { display: block; margin-bottom: 4px; font-weight: 500; } .form-item input, .form-item textarea { width: 100%; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; } .form-item textarea { resize: vertical; } .form-btn-group { display: flex; gap: 10px; margin-top: 20px; } .form-btn-group button { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; } .form-btn-group button[type="submit"] { background-color: #28a745; color: #fff; } .form-btn-group .close-form-btn { background-color: #dc3545; color: #fff; }