diff --git a/search-filter/css/style.css b/search-filter/css/style.css index a4b9d03e..1ef77b04 100644 --- a/search-filter/css/style.css +++ b/search-filter/css/style.css @@ -404,3 +404,255 @@ h1 { background: #1a2639; color: white; } + +/* ========== 新增样式:排序、分页、自动补全、统计、无结果 ========== */ + +/* 排序区域 */ +.sort-section { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 25px; + padding: 15px 0; + border-bottom: 1px solid #eef2f6; +} + +.sort-buttons { + display: flex; + gap: 12px; + align-items: center; +} + +.sort-label { + color: #6c757d; + font-size: 0.95rem; +} + +.sort-btn { + padding: 8px 18px; + background: white; + border: 1.5px solid #e0e4e9; + border-radius: 40px; + color: #495057; + font-size: 0.95rem; + cursor: pointer; + transition: all 0.2s; +} + +.sort-btn:hover { + border-color: #ffb347; + background: #fff9f0; +} + +.sort-btn.active { + background: #1a2639; + border-color: #1a2639; + color: white; +} + +.sort-order { + display: flex; + align-items: center; + gap: 6px; + color: #495057; +} + +/* 自动补全 */ +.autocomplete-panel { + position: absolute; + top: 70px; + left: 0; + right: 0; + background: white; + border-radius: 24px; + box-shadow: 0 12px 30px rgba(0,0,0,0.15); + padding: 10px 0; + z-index: 200; + border: 1px solid #eef2f6; + max-height: 300px; + overflow-y: auto; +} + +.autocomplete-panel.hidden { + display: none; +} + +.autocomplete-list { + list-style: none; +} + +.autocomplete-item { + padding: 12px 20px; + cursor: pointer; + transition: background 0.2s; + color: #1a2639; +} + +.autocomplete-item:hover { + background: #f8fafd; +} + +/* 统计区域 */ +.stats-section { + display: flex; + justify-content: space-between; + margin-bottom: 15px; + padding: 10px 0; + color: #6c757d; + font-size: 0.95rem; + border-bottom: 1px dashed #e0e4e9; +} + +/* 无结果提示 */ +.no-results-panel { + text-align: center; + padding: 40px 20px; + background: #f8fafd; + border-radius: 32px; + margin: 20px 0; +} + +.no-results-panel.hidden { + display: none; +} + +.no-results-panel p { + color: #6c757d; + margin-bottom: 20px; + font-size: 1.1rem; +} + +.suggestions-panel { + margin-top: 20px; +} + +.suggestions-panel p { + font-size: 0.95rem; + margin-bottom: 15px; +} + +.suggestion-tags { + display: flex; + flex-wrap: wrap; + gap: 12px; + justify-content: center; +} + +.suggestion-tag { + padding: 8px 18px; + background: white; + border: 1.5px solid #ffd166; + border-radius: 40px; + color: #b85e00; + font-size: 0.95rem; + cursor: pointer; + transition: all 0.2s; +} + +.suggestion-tag:hover { + background: #ffd166; + color: #1a2639; +} + +/* 模糊匹配标记 */ +.fuzzy-badge { + background: #e3f2fd; + color: #1976d2; + font-size: 0.75rem; + padding: 2px 8px; + border-radius: 40px; + margin-left: 8px; +} + +/* 分页区域 */ +.pagination-section { + margin-top: 40px; + padding-top: 25px; + border-top: 2px solid #eef2f6; + display: flex; + flex-wrap: wrap; + gap: 20px; + align-items: center; + justify-content: space-between; +} + +.pagination-controls { + display: flex; + gap: 8px; + align-items: center; +} + +.pagination-controls button { + padding: 8px 16px; + background: white; + border: 1.5px solid #e0e4e9; + border-radius: 40px; + color: #495057; + font-size: 1rem; + cursor: pointer; + transition: all 0.2s; + min-width: 45px; +} + +.pagination-controls button:hover:not(:disabled) { + border-color: #ffb347; + background: #fff9f0; +} + +.pagination-controls button:disabled { + opacity: 0.4; + cursor: not-allowed; +} + +#pageInfo { + margin: 0 12px; + color: #1a2639; + font-weight: 500; +} + +.pagination-size select { + padding: 8px 16px; + border: 1.5px solid #e0e4e9; + border-radius: 40px; + background: white; + color: #1a2639; + outline: none; + cursor: pointer; +} + +.pagination-jump { + display: flex; + gap: 8px; + align-items: center; +} + +.pagination-jump input { + width: 70px; + padding: 8px 12px; + border: 1.5px solid #e0e4e9; + border-radius: 40px; + text-align: center; + outline: none; +} + +.pagination-jump button { + padding: 8px 18px; + background: #1a2639; + border: none; + border-radius: 40px; + color: white; + cursor: pointer; + transition: all 0.2s; +} + +.pagination-jump button:hover { + background: #2c3e50; +} + +/* 响应式调整 */ +@media (max-width: 768px) { + .pagination-section { + flex-direction: column; + align-items: flex-start; + } +} diff --git a/search-filter/index.html b/search-filter/index.html index 64b93893..094bf4a1 100644 --- a/search-filter/index.html +++ b/search-filter/index.html @@ -3,22 +3,27 @@
-糖星云陪妈妈一起做 · 环节4:搜索历史+筛选预设+实时高亮
+糖星云陪妈妈一起做 · 环节5+6:排序+分页+模糊+拼音+自动补全
- +