/* 保留原有样式基础上，修改图片区域样式 */ .doc-image {height: 160px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; } .placeholder-icon {font-size: 3rem; margin-bottom: 10px; opacity: 0.7; animation: float 3s ease-in-out infinite; position: absolute; right: 10px; bottom: 10px; } .initial-circle {width: 80px; height: 80px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: flex; justify-content: center; align-items: center; font-size: 2.5rem; font-weight: bold; color: white; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); position: absolute; left: 10px; bottom: 20px; } .pattern-dots {position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: radial-gradient(circle, white 2px, transparent 2px); background-size: 20px 20px; opacity: 0.1; } .pattern-lines {position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%); background-size: 10px 10px; opacity: 0.3; } /* 动态图标动画 */ @keyframes float {0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(5deg); } } @keyframes pulse {0%, 100% { opacity: 0.7; } 50% { opacity: 0.9; } } @keyframes spin {0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .animate-float { animation: float 5s ease-in-out infinite; } .animate-pulse { animation: pulse 2s ease-in-out infinite; } .animate-spin { animation: spin 8s linear infinite; } /* 原有样式保持不变 */ :root {--primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #dbeafe; --secondary: #4f46e5; --light: #f8fafc; --dark: #0f172a; --gray: #64748b; --success: #10b981; --border: #e2e8f0; --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } * {margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif; } body {background-color: #f9fafb; color: var(--dark); line-height: 1.6; overflow-x: hidden; font-size: 1rem; display: flex; flex-direction: column; min-height: 100vh; } a {text-decoration: none; color: #000; transition: all 0.3s ease; } a:hover {color: var(--primary-dark); } .docs-container {margin: 0 auto; padding: 0 20px; } /* 页面标题区域 */ .page-header {background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden; } .page-header::before {content: ''; position: absolute; top: -50px; right: -50px; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; } .page-header::after {content: ''; position: absolute; bottom: -80px; left: -80px; width: 300px; height: 300px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; } .page-header h1 {font-size: 2.5rem; margin-bottom: 20px; position: relative; z-index: 2; } .page-header p {max-width: 700px; margin: 0 auto; font-size: 1.2rem; opacity: 0.9; position: relative; z-index: 2; } /* 全局搜索区域 */ .global-search {background-color: var(--primary-light); padding: 20px 0; margin-bottom: 2rem; } .search-container {display: flex; align-items: center; gap: 15px; max-width: 800px; margin: 0 auto; } .search-container input {flex: 1; padding: 15px 20px; border: 2px solid var(--border); border-radius: 50px; font-size: 1rem; transition: all 0.3s ease; } .search-container input:focus {outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); } .search-container button {background: var(--primary); color: white; border: none; padding: 15px 25px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; } .search-container button:hover {background: var(--primary-dark); } /* 文档页面特定样式 */ .docs-container {display: flex; flex: 1; margin: 2rem 0; gap: 30px; } /* 侧边栏分类树 */ .docs-sidebar {flex: 0 0 280px; background: white; border-radius: 12px; padding: 25px; box-shadow: var(--shadow); height: fit-content; position: sticky; top: 100px; max-height: calc(100vh - 140px); overflow-y: auto; transition: all 0.3s ease; } .docs-sidebar h2 {font-size: 1.4rem; color: var(--dark); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); } .category-tree {list-style: none; } .category-tree li {margin-bottom: 8px; position: relative; } .category-tree > li > .tree-toggle {font-weight: 600; } .tree-toggle {display: flex; align-items: center; padding: 10px 15px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; margin:5px 0; } .tree-toggle:hover {background-color: var(--primary-light); } .tree-toggle.active {background-color: var(--primary-light); color: var(--primary); } .tree-toggle i {margin-right: 10px; transition: transform 0.3s ease; } .tree-toggle.active i {transform: rotate(90deg); } .tree-children {list-style: none; padding-left: 30px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; } .tree-children.show {max-height: 1000px; } .tree-children li {margin-bottom: 5px; } .tree-children a {display: block; padding: 8px 15px; border-radius: 6px; color: var(--gray); transition: all 0.3s ease; } .tree-children a:hover, .tree-children a.active {background-color: var(--primary-light); color: var(--primary); } /* 文档内容区域 */ .docs-content {flex: 1; background: white; border-radius: 12px; padding: 30px; box-shadow: var(--shadow); } .docs-header {margin-bottom: 30px; } .breadcrumb {display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 15px; font-size: 0.9rem; color: var(--gray); } .breadcrumb a {color: var(--gray); } .breadcrumb span {margin: 0 8px; } .docs-header h1 {font-size: 2.2rem; color: var(--dark); margin-bottom: 15px; } .docs-header p {color: var(--gray); font-size: 1.1rem; line-height: 1.6; } /* 文档卡片 */ .docs-grid {display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; margin-bottom: 40px; } .doc-card {background: var(--light); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); height: 100%; display: flex; flex-direction: column; } .doc-card:hover {transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); } .doc-image {height: 160px; overflow: hidden; } .doc-image img {width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .doc-card:hover .doc-image img {transform: scale(1.05); } .doc-body {padding: 20px; flex-grow: 1; display: flex; flex-direction: column; } .doc-tags {display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; } .doc-tag {background: var(--primary-light); color: var(--primary); padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; } .doc-body h3 {font-size: 1.3rem; margin-bottom: 10px; color: var(--dark); } .doc-body p {color: var(--gray); margin-bottom: 20px; flex-grow: 1; } .doc-footer {display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--gray); } .doc-date {display: flex; align-items: center; } .doc-date i {margin-right: 5px; } .doc-link {color: var(--primary); font-weight: 600; display: flex; align-items: center; } .doc-link i {margin-left: 5px; transition: transform 0.3s ease; } .doc-card:hover .doc-link i {transform: translateX(3px); } /* 分类卡片样式 */ .category-grid {display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; } .category-card {background: var(--light); border-radius: 12px; padding: 20px; text-align: center; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); cursor: pointer; } .category-card:hover {transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); background: var(--primary-light); } .category-icon {font-size: 2.5rem; margin-bottom: 15px; display: block; } .category-card h3 {font-size: 1.2rem; margin-bottom: 10px; color: var(--dark); } .category-card p {color: var(--gray); font-size: 0.9rem; } /* 文章内容样式 */ .article-content {line-height: 1.8; } /* 分页 */ .pagination {display: flex; justify-content: center; margin-top: 40px; } .pagination a {display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; margin: 0 5px; color: var(--dark); background: white; border: 1px solid var(--border); transition: all 0.3s ease; } .pagination a:hover, .pagination a.active {background: var(--primary); color: white; border-color: var(--primary); } /* 搜索结果样式 */ .search-results {margin-bottom: 30px; } .search-results h2 {font-size: 1.5rem; margin-bottom: 15px; color: var(--dark); } .search-results .results-count {color: var(--gray); margin-bottom: 20px; } .no-results {text-align: center; padding: 40px 0; color: var(--gray); } .no-results i {font-size: 3rem; margin-bottom: 15px; display: block; color: var(--primary-light); } /* 加载动画 */ .loading {display: flex; justify-content: center; align-items: center; padding: 40px 0; } .loading-spinner {width: 40px; height: 40px; border: 4px solid var(--primary-light); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin {0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 响应式设计 */ @media (max-width: 992px) {.docs-container {flex-direction: column; } .docs-sidebar {position: relative; top: 0; max-height: none; margin-bottom: 20px; flex: 1; } } @media (max-width: 768px) {.navbar {flex-direction: column; gap: 20px; } .nav-links {flex-wrap: wrap; justify-content: center; } .mobile-menu-btn {display: block; position: absolute; top: 20px; right: 20px; } .docs-grid {grid-template-columns: 1fr; } .search-container {flex-direction: column; } .search-container button {width: 100%; } } @media (max-width: 576px) {.docs-content {padding: 20px; } .docs-header h1 {font-size: 1.8rem; } .breadcrumb {font-size: 0.8rem; } .search-container input {width: 100%; flex: 1; padding: 15px 20px; border: 2px solid var(--border); border-radius: 50px; font-size: 1rem; } } /* 动画效果 */ @keyframes fadeIn {from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .fade-in {animation: fadeIn 0.5s ease forwards; } .delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; }