1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
|
#local-search .search-dialog background: rgba(188, 170, 226, 0.98) // 浅紫色半透明背景 backdrop-filter: blur(6px) saturate(180%) // 背景模糊+饱和度提升 border: 3px solid #e8dfff // 浅紫色边框 box-shadow: 0 8px 32px rgba(200, 180, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.6) inset // 外阴影+内发光 border-radius: 16px // 大圆角边框 font-family: 'Comic Neue', cursive // 手写风格字体 .local-search-box position: relative margin-bottom: 1.2rem // 底部间距 input background: white !important // 白色背景 border: 3px solid #d8c4ff !important // 紫色边框 color: #6a4c9e !important // 深紫色文字 width: 100% border-radius: 30px // 胶囊形状 padding: 12px 55px 12px 35px // 内边距(右侧留出图标空间) font-size: 1.05em font-weight: 600 // 加粗字体 letter-spacing: 0.8px // 字符间距 box-shadow: 0 4px 12px rgba(180,160,255,0.2), 0 2px 0 rgba(255,255,255,0.8) inset // 外阴影+内高光 transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) // 弹性动画过渡 &::placeholder color: #b8a5e3 // 浅紫色文字 font-style: italic // 斜体 text-shadow: 0 1px 2px rgba(255,255,255,0.5) // 文字投影 &:focus border-color: #ff9dff !important // 粉色边框 box-shadow: 0 0 25px rgba(255,157,255,0.3), 0 6px 0 rgba(255,157,255,0.2) inset // 发光效果 padding-right: 60px // 右侧扩展 transform: translateY(-2px) // 轻微上浮 &::after content: '\f005' // FontAwesome星星图标 font-family: 'Font Awesome 5 Free' font-weight: 900 position: absolute right: 25px // 右侧定位 top: 50% transform: translateY(-50%) rotate(15deg) // 居中+旋转 color: #ff9dff // 粉色 font-size: 1.4em text-shadow: 0 2px 4px rgba(255,157,255,0.3) // 图标阴影 transition: all 0.3s ease // 过渡动画 &:hover::after transform: translateY(-50%) rotate(0deg) scale(1.2) // 旋转复位+放大 color: #ff6bff // 亮粉色 .search-result-list border-radius: 12px padding: 15px margin: 0 -15px // 负边距对齐 border: 2px solid rgb(220, 211, 243) // 浅紫色边框 box-shadow: 0 4px 12px rgba(200,180,255,0.15) inset // 内阴影 .search-result-list max-height: 60vh // 最大高度 overflow-y: auto // 垂直滚动 &::-webkit-scrollbar-track background: rgba(232, 223, 255, 0.3) // 半透明背景 border-radius: 10px margin: 8px 0 border: 2px dashed rgba(200, 180, 255, 0.5) // 虚线边框 &::-webkit-scrollbar-thumb background: linear-gradient(45deg,rgb(222, 206, 255),rgb(171, 124, 247)) // 紫色渐变 border-radius: 10px box-shadow: inset 0 0 3px rgba(0,0,0,0.1) // 内阴影 &::-webkit-scrollbar width: 10px height: 10px .local-search-hit-item background: white // 白色背景 margin: 10px 0 padding: 15px 20px border-radius: 10px border: 2px solid #e8dfff // 浅紫色边框 position: relative transition: all 0.3s ease // 过渡动画 &::before content: '' position: absolute left: -12px top: 15px width: 0 height: 0 border-style: solid border-width: 8px 12px 8px 0 // 创建右侧三角形 border-color: transparent #e8dfff transparent transparent // 浅紫色 &:hover transform: translateX(8px) // 向右移动 box-shadow: 6px 6px 0 rgba(200,180,255,0.3) // 投影效果 background: linear-gradient(145deg, #ffffff, #faf5ff) // 渐变背景 &::before border-color: transparent #ff9dff transparent transparent // 变为粉色 a color: #8a6dca !important // 紫色链接 text-decoration: none position: relative &:hover color: #ff6bff !important // 亮粉色 text-decoration: underline wavy #ff9dff // 波浪下划线 .search-result-title font-size: 1.15em color: #6a4c9e !important // 深紫色 text-shadow: 0 2px 2px rgba(0,0,0,0.05) // 文字阴影 .search-result color: #8870a8 // 浅紫色文字 line-height: 1.7 // 宽松行高
.search-keyword color: #ff6bff !important // 亮粉色 position: relative padding: 0 2px background: linear-gradient(45deg, transparent 30%, rgba(255,107,255,0.15) 50%, transparent 70%) animation: sparkle 1s infinite linear // 流光动画 &::after content: '☆' // 星星符号 position: absolute right: -12px top: -8px font-size: 0.8em color: #ff9dff animation: twinkle 1.5s infinite // 闪烁动画
@keyframes sparkle 0% { background-position: -100% 0 } 100% { background-position: 200% 0 }
@keyframes twinkle 0%, 100% { opacity: 0.3; transform: scale(0.8) } 50% { opacity: 1; transform: scale(1.2) }
.search-loading display: none // 默认隐藏 text-align: center padding: 20px &.active display: block .loading-sparkle display: inline-block width: 40px height: 40px background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23ff9dff" d="M12,2L4,12L12,22L20,12L12,2M12,5L16.5,12L12,19L7.5,12L12,5Z"/></svg>') no-repeat center animation: spin-sparkle 1.2s linear infinite .loading-text color: #8a6dca margin-top: 10px font-weight: bold text-shadow: 0 1px 0 white
@keyframes spin-sparkle 0% transform: rotate(0deg) scale(1) opacity: 1 50% transform: rotate(180deg) scale(1.2) opacity: 0.7 100% transform: rotate(360deg) scale(1) opacity: 1
.search-empty display: none // 默认隐藏 text-align: center padding: 30px 20px &.active display: block .empty-icon font-size: 3em color: #d8c4ff margin-bottom: 15px text-shadow: 0 2px 0 white .empty-title color: #6a4c9e font-size: 1.2em margin-bottom: 10px .empty-desc color: #8870a8 font-style: italic
@media screen and (max-width: 768px) #local-search .search-dialog width: 90vw !important // 宽度调整为90%视口 left: 5vw !important // 水平居中 // 隐藏对话框箭头 &::before display: none // 调整结果列表高度 .search-result-list max-height: 50vh // 调整结果项样式 .local-search-hit-item padding: 12px 15px // 调整三角箭头大小 &::before left: -10px top: 12px border-width: 6px 10px 6px 0 // 4. 结果数量提示 .search-result-count position: sticky // 粘性定位 top: 0 background: rgba(245, 240, 255, 0.9) // 半透明背景 backdrop-filter: blur(5px) // 背景模糊 padding: 8px 15px margin: -15px -15px 15px // 负边距对齐 border-bottom: 2px solid #e8dfff // 底部边框 z-index: 1 // 层级控制 color: #8a6dca font-weight: bold // 关键词样式 .search-keyword color: #ff6bff padding: 0 4px
|