Files
WebServer/static/css/style.css
2025-08-28 23:59:13 +08:00

1432 lines
24 KiB
CSS

/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #1a1a1a;
background-color: #ffffff;
}
li::marker {
unicode-bidi: isolate;
font-variant-numeric: tabular-nums;
text-transform: none;
text-indent: 0px !important;
text-align: start !important;
text-align-last: auto !important;
}
.container {
width: 90%;
max-width: 1400px;
margin: 0 auto;
padding: 0 20px;
}
a {
text-decoration: none;
color: #0052cc;
transition: color 0.2s ease;
}
a:hover {
color: #003d99;
}
.btn {
display: inline-block;
padding: 12px 24px;
background-color: #0052cc;
color: white;
border-radius: 6px;
font-weight: 500;
transition: all 0.3s ease;
border: none;
cursor: pointer;
}
.btn:hover {
background-color: #003d99;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}
.btn-outline {
background-color: transparent;
border: 2px solid #0052cc;
color: #0052cc;
}
.btn-outline:hover {
background-color: #0052cc;
color: white;
}
/* 头部样式 */
header {
background-color: rgba(255, 255, 255, 0.98);
backdrop-filter: blur(10px);
border-bottom: 1px solid #f0f0f0;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
transition: all 0.3s ease;
}
header .container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
}
header h1 {
font-size: 1.8rem;
font-weight: 700;
margin: 0;
}
header h1 a {
color: #0052cc;
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
}
.logo-img {
width: 170px;
height: 55px;
display: block;
}
.logo {
font-size: 2rem;
font-weight: bold;
background: linear-gradient(135deg, #0052cc, #0077ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
header nav {
display: flex;
align-items: center;
gap: 30px;
}
header nav ul {
display: flex;
list-style: none;
gap: 25px;
margin: 0;
padding: 0;
}
header nav ul li a {
color: #1a1a1a;
font-weight: 500;
font-size: 0.95rem;
padding: 8px 0;
position: relative;
}
header nav ul li a:hover {
color: #0052cc;
}
header nav ul li a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background-color: #0052cc;
transition: width 0.3s ease;
}
header nav ul li a:hover::after {
width: 100%;
}
/* 主要内容区域 */
main {
margin-top: 80px;
padding: 0;
}
/* 英雄区域 - 金融平台风格 */
.hero {
background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
padding: 40px 0;
color: white;
position: relative;
overflow: hidden;
}
.hero .container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 60px;
align-items: center;
}
.hero-content h1 {
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 15px;
line-height: 1.2;
background: linear-gradient(135deg, #0077ff, #00aaff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero-subtitle {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 20px;
color: #ffffff;
}
.hero-description {
font-size: 1.1rem;
margin-bottom: 40px;
color: #cccccc;
line-height: 1.6;
}
.hero-buttons {
display: flex;
gap: 15px;
}
.btn-primary {
background: linear-gradient(135deg, #0077ff, #00aaff);
border: none;
}
.btn-primary:hover {
background: linear-gradient(135deg, #0066cc, #0088ff);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 119, 255, 0.3);
}
/* 市场行情显示器 */
.market-ticker {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 16px;
padding: 25px;
border: 1px solid rgba(255, 255, 255, 0.2);
}
.ticker-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.ticker-header h3 {
color: white;
margin: 0;
font-size: 1.2rem;
}
.refresh-badge {
background: #00cc00;
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 600;
}
.ticker-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ticker-item:last-child {
border-bottom: none;
}
.ticker-item .symbol {
font-weight: 600;
color: white;
}
.ticker-item .price {
font-weight: 600;
color: white;
}
.ticker-item .change {
font-weight: 600;
padding: 4px 8px;
border-radius: 4px;
}
.ticker-item .change.positive {
background: rgba(0, 204, 0, 0.2);
color: #00cc00;
}
.ticker-item .change.negative {
background: rgba(204, 0, 0, 0.2);
color: #cc0000;
}
/* 特性部分 */
.features-section {
padding: 100px 0;
background: #ffffff;
}
.section-header {
text-align: center;
margin-bottom: 60px;
}
.section-header h2 {
font-size: 2.5rem;
font-weight: 700;
color: #1a1a1a;
margin-bottom: 15px;
}
.section-header p {
font-size: 1.1rem;
color: #666;
max-width: 600px;
margin: 0 auto;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 30px;
}
.feature-card {
background: #ffffff;
padding: 30px;
border-radius: 12px;
box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
text-align: center;
border: 1px solid #f0f0f0;
transition: all 0.3s ease;
}
.feature-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
.feature-card .feature-icon {
font-size: 2.5rem;
margin-bottom: 20px;
}
.feature-card h3 {
font-size: 1.3rem;
font-weight: 600;
margin-bottom: 15px;
color: #1a1a1a;
}
.feature-card p {
color: #666;
line-height: 1.6;
}
/* 交易工具部分 */
.trading-tools {
padding: 100px 0;
background: #f8f9ff;
}
.tools-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}
.tool-card {
background: #ffffff;
padding: 30px;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
}
.tool-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.tool-card h3 {
font-size: 1.3rem;
font-weight: 600;
margin-bottom: 15px;
color: #0052cc;
}
.tool-card p {
color: #666;
line-height: 1.6;
}
/* 应用下载CTA */
.app-download {
padding: 100px 0;
background: linear-gradient(135deg, #0052cc 0%, #0077ff 100%);
color: white;
text-align: center;
}
.download-content h2 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 15px;
}
.download-content p {
font-size: 1.2rem;
margin-bottom: 40px;
opacity: 0.9;
}
.download-buttons {
display: flex;
gap: 20px;
justify-content: center;
}
.download-buttons .btn {
display: flex;
align-items: center;
gap: 10px;
padding: 15px 30px;
font-weight: 600;
}
.download-buttons .btn-outline {
background: transparent;
border: 2px solid white;
color: white;
}
.download-buttons .btn-outline:hover {
background: white;
color: #0052cc;
}
.download-buttons .icon {
font-size: 1.2rem;
}
/* 特性网格 */
.features {
padding: 100px 0;
background: #ffffff;
}
.section-title {
text-align: center;
margin-bottom: 60px;
}
.section-title h2 {
font-size: 2.5rem;
font-weight: 700;
color: #1a1a1a;
margin-bottom: 15px;
}
.section-title p {
font-size: 1.1rem;
color: #666;
max-width: 600px;
margin: 0 auto;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 40px;
}
.feature {
background: #ffffff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease;
text-align: center;
border: 1px solid #f0f0f0;
}
.feature:hover {
transform: translateY(-8px);
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
.feature-icon {
width: 60px;
height: 60px;
margin: 0 auto 25px;
background: linear-gradient(135deg, #0052cc, #0077ff);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.5rem;
}
.feature h3 {
font-size: 1.4rem;
font-weight: 600;
margin-bottom: 15px;
color: #1a1a1a;
}
.feature p {
color: #666;
line-height: 1.6;
}
/* 服务网格 */
.services {
padding: 100px 0;
background: #f8f9ff;
}
.services-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-top: 50px;
}
.service {
background: #ffffff;
padding: 30px;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
}
.service:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.service h3 {
font-size: 1.3rem;
font-weight: 600;
margin-bottom: 15px;
color: #0052cc;
}
/* 页脚样式 */
footer {
background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
color: white;
padding: 60px 0 30px;
}
footer .container {
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr;
gap: 5px;
}
.footer-brand h3 {
font-size: 1.8rem;
margin-bottom: 15px;
background: linear-gradient(135deg, #ccc, #ccc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.footer-brand p {
color: #ccc;
line-height: 1.6;
margin-bottom: 20px;
}
.footer-links h4 {
font-size: 1.1rem;
margin-bottom: 20px;
color: #ffffff;
}
.footer-links ul {
list-style: none;
padding: 0;
}
.footer-links ul li {
margin-bottom: 10px;
}
.footer-links ul li a {
color: #ccc;
transition: color 0.2s ease;
}
.footer-links ul li a:hover {
color: #0077ff;
}
.footer-bottom {
grid-column: 1 / -1;
text-align: center;
padding-top: 30px;
border-top: 1px solid #444;
margin-top: 40px;
}
.footer-bottom p {
color: #999;
margin: 0;
}
/* 语言切换器样式 */
.language-switcher {
display: flex;
align-items: center;
gap: 10px;
}
.language-switcher select {
border: none;
background: transparent;
color: #666;
font-weight: 500;
font-size: 0.9rem;
padding: 4px 8px;
cursor: pointer;
outline: none;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
.language-switcher select:focus {
outline: none;
}
/* 响应式设计 */
@media (max-width: 1024px) {
footer .container {
grid-template-columns: 1fr 1fr;
gap: 30px;
}
.hero .container {
gap: 40px;
}
.hero-content h1 {
font-size: 3rem;
}
}
@media (max-width: 768px) {
header .container {
flex-direction: row;
gap: 0;
}
.hero .container {
grid-template-columns: 1fr;
gap: 40px;
text-align: center;
}
.hero-content h1 {
font-size: 2.5rem;
}
.hero-subtitle {
font-size: 1.3rem;
}
.hero-description {
font-size: 1rem;
}
.hero-buttons {
justify-content: center;
}
.market-ticker {
order: -1;
}
.features-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.feature-card {
padding: 25px;
}
.tools-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.tool-card {
padding: 25px;
}
.download-buttons {
flex-direction: column;
align-items: center;
}
.download-buttons .btn {
width: 100%;
max-width: 250px;
justify-content: center;
}
.feature-grid {
grid-template-columns: 1fr;
gap: 30px;
}
.feature {
padding: 30px;
}
footer .container {
grid-template-columns: 1fr;
gap: 30px;
}
.services-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.service {
padding: 25px;
}
}
@media (max-width: 480px) {
.container {
padding: 0 15px;
}
.hero {
padding: 80px 0 40px;
}
.hero-content h1 {
font-size: 2rem;
}
.hero-subtitle {
font-size: 1.1rem;
}
.section-header h2 {
font-size: 2rem;
}
.section-title h2 {
font-size: 2rem;
}
.feature {
padding: 20px;
}
.feature-card {
padding: 20px;
}
.tool-card {
padding: 20px;
}
.service {
padding: 20px;
}
.download-content h2 {
font-size: 2rem;
}
.download-content p {
font-size: 1rem;
}
/* 移动端表格优化 */
.ticker-item {
flex-wrap: wrap;
gap: 8px;
}
.ticker-item .symbol,
.ticker-item .price,
.ticker-item .change {
flex: 1;
min-width: 80px;
text-align: center;
}
}
/* 超小屏幕设备 */
@media (max-width: 360px) {
.hero-content h1 {
font-size: 1.8rem;
}
.hero-buttons .btn {
padding: 10px 20px;
font-size: 0.9rem;
}
.feature-icon {
width: 50px;
height: 50px;
font-size: 1.2rem;
}
.feature h3 {
font-size: 1.2rem;
}
.feature-card .feature-icon {
font-size: 2rem;
}
.feature-card h3 {
font-size: 1.1rem;
}
}
/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
.hero {
padding: 60px 0;
}
.nav-menu {
padding: 60px 20px 20px;
}
.nav-menu ul li a {
padding: 10px 0;
font-size: 1rem;
}
}
/* 移动端导航菜单 */
@media (max-width: 768px) {
.mobile-menu-toggle {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 30px;
height: 24px;
background: none;
border: none;
cursor: pointer;
padding: 0;
z-index: 1000;
}
.mobile-menu-toggle span {
display: block;
height: 3px;
width: 100%;
background-color: #1a1a1a;
border-radius: 3px;
transition: all 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) {
transform: translateY(10px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
transform: translateY(-10px) rotate(-45deg);
}
.nav-menu {
position: fixed;
top: 0;
right: -100%;
width: 80%;
max-width: 320px;
height: 100vh;
background: white;
box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
padding: 80px 30px 30px;
transition: right 0.3s ease;
z-index: 999;
overflow-y: auto;
}
.nav-menu.active {
right: 0;
}
.nav-menu ul {
flex-direction: column;
gap: 0;
width: 100%;
}
.nav-menu ul li {
width: 100%;
border-bottom: 1px solid #f0f0f0;
}
.nav-menu ul li:last-child {
border-bottom: none;
}
.nav-menu ul li a {
display: block;
padding: 15px 0;
font-size: 1.1rem;
font-weight: 500;
}
.nav-menu ul li a::after {
display: none;
}
.language-switcher {
margin-top: 30px;
flex-direction: column;
align-items: flex-start;
gap: 15px;
width: 100%;
}
.language-switcher select {
font-size: 1rem;
padding: 8px 12px;
}
/* 防止背景滚动 */
body.menu-open {
overflow: hidden;
}
/* 覆盖层 */
.nav-menu::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: -1;
}
.nav-menu.active::before {
opacity: 1;
visibility: visible;
}
}
/* 超小屏幕导航优化 */
@media (max-width: 480px) {
.nav-menu {
width: 85%;
padding: 70px 20px 20px;
}
.nav-menu ul li a {
font-size: 1rem;
padding: 12px 0;
}
.language-switcher {
margin-top: 20px;
}
}
/* 高DPI设备优化 */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
.mobile-menu-toggle span {
height: 2.5px;
}
}
/* 减少动画对性能的影响 */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* 联系页面样式 */
.contact {
padding: 40px 0;
}
.contact .container {
max-width: 1000px;
}
.contact h2 {
font-size: 2.5rem;
text-align: center;
margin-bottom: 40px;
color: #1a1a1a;
}
.contact-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 50px;
align-items: start;
}
.contact-info h3,
.contact-form h3 {
font-size: 1.5rem;
margin-bottom: 20px;
color: #0052cc;
}
.contact-info p {
line-height: 2;
margin-bottom: 15px;
color: #666;
}
.contact-info p strong {
color: #1a1a1a;
}
.contact-form {
background: #f8f9ff;
padding: 25px;
border-radius: 10px;
border: 1px solid #e0e0e0;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #1a1a1a;
line-height: 1.6;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
line-height: 1.6;
transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: #0052cc;
box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}
.form-group textarea {
resize: vertical;
min-height: 120px;
}
.success-message {
background: #d4edda;
color: #155724;
padding: 15px;
border-radius: 6px;
margin-bottom: 30px;
text-align: center;
line-height: 1.6;
}
/* 响应式设计 */
@media (max-width: 768px) {
.contact-grid {
grid-template-columns: 1fr;
gap: 40px;
}
.contact-form {
padding: 25px;
}
.contact h2 {
font-size: 2rem;
}
.contact-info h3,
.contact-form h3 {
font-size: 1.3rem;
}
}
/* 佣金费率表格样式 */
.commission-table {
padding: 80px 0;
background: #f8f9ff;
}
.table-container {
overflow-x: auto;
margin: 30px 0;
border-radius: 12px;
box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}
.commission-rates-table {
width: 100%;
border-collapse: collapse;
background: white;
border-radius: 12px;
overflow: hidden;
}
.commission-rates-table th,
.commission-rates-table td {
padding: 16px 20px;
text-align: left;
border-bottom: 1px solid #f0f0f0;
}
.commission-rates-table th {
background: linear-gradient(135deg, #0052cc, #0077ff);
color: white;
font-weight: 600;
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.commission-rates-table tr:last-child td {
border-bottom: none;
}
.commission-rates-table tr:hover {
background-color: #f8f9ff;
}
.commission-rates-table td {
color: #666;
font-size: 0.95rem;
line-height: 1.6;
}
.commission-rates-table td:first-child {
font-weight: 600;
color: #1a1a1a;
}
.table-notes {
text-align: center;
margin-top: 20px;
color: #999;
font-size: 0.9rem;
line-height: 1.6;
}
/* 响应式表格 */
@media (max-width: 768px) {
.commission-table {
padding: 60px 0;
}
.commission-rates-table th,
.commission-rates-table td {
padding: 12px 15px;
font-size: 0.85rem;
}
.commission-rates-table th {
font-size: 0.8rem;
}
}
@media (max-width: 480px) {
.commission-rates-table {
font-size: 0.8rem;
}
.commission-rates-table th,
.commission-rates-table td {
padding: 10px 12px;
}
.table-container {
margin: 20px -15px;
border-radius: 0;
}
}
/* Tabbed Interface Styles */
.tabs-container {
margin: 40px 0;
}
.tabs {
display: flex;
justify-content: center;
margin-bottom: 30px;
flex-wrap: wrap;
gap: 10px;
}
.tab-button {
padding: 12px 24px;
background-color: #f0f0f0;
border: none;
border-radius: 6px;
font-weight: 500;
color: #666;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.95rem;
}
.tab-button:hover {
background-color: #e0e0e0;
color: #333;
}
.tab-button.active {
background: linear-gradient(135deg, #0052cc, #0077ff);
color: white;
box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}
.tab-content {
border: 1px solid #f0f0f0;
border-radius: 12px;
background: white;
overflow: hidden;
}
.tab-pane {
display: none;
padding: 0;
}
.tab-pane.active {
display: block;
}
/* Responsive Tabs */
@media (max-width: 768px) {
.tabs {
flex-direction: column;
align-items: center;
gap: 8px;
}
.tab-button {
width: 100%;
max-width: 300px;
text-align: center;
padding: 10px 20px;
font-size: 0.9rem;
}
}
@media (max-width: 480px) {
.tabs {
gap: 6px;
}
.tab-button {
padding: 8px 16px;
font-size: 0.85rem;
}
.tab-content {
border-radius: 8px;
}
}
/* Volume Discounts Styles */
.volume-discounts {
margin-top: 40px;
padding: 30px;
background: #f8f9ff;
border-radius: 12px;
border: 1px solid #e0e0e0;
}
.volume-discounts h4 {
font-size: 1.4rem;
color: #0052cc;
margin-bottom: 25px;
text-align: center;
font-weight: 600;
}
.discount-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}
.discount-tier {
background: white;
padding: 25px;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
border: 1px solid #f0f0f0;
}
.discount-tier h5 {
font-size: 1.1rem;
color: #1a1a1a;
margin-bottom: 20px;
font-weight: 600;
text-align: center;
padding-bottom: 15px;
border-bottom: 2px solid #0052cc;
}
.discount-tier p {
margin: 12px 0;
color: #666;
line-height: 1.5;
font-size: 0.95rem;
}
.discount-tier p:first-of-type {
margin-top: 0;
}
.discount-tier p:last-of-type {
margin-bottom: 0;
}
/* Responsive Design for Discounts */
@media (max-width: 768px) {
.volume-discounts {
padding: 20px;
margin-top: 30px;
}
.discount-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.discount-tier {
padding: 20px;
}
.volume-discounts h4 {
font-size: 1.2rem;
margin-bottom: 20px;
}
}
@media (max-width: 480px) {
.volume-discounts {
padding: 15px;
margin-top: 25px;
}
.discount-tier {
padding: 15px;
}
.discount-tier h5 {
font-size: 1rem;
margin-bottom: 15px;
}
.discount-tier p {
font-size: 0.9rem;
margin: 10px 0;
}
}
/* 帮助页面样式 */
.nav-item {
position: relative;
list-style: none;
}
.subnav {
display: none;
/* 默认隐藏 */
position: absolute;
top: 100%;
left: 0;
background: #fff;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0;
margin: 0;
}
.subnav li {
padding: 0;
}
.subnav a {
display: block;
padding: 10px;
color: #333;
text-decoration: none;
}
.subnav a:hover {
background: #f0f0f0;
}
/* 当有active类时显示下拉菜单 */
.subnav.active {
display: block;
}