diff --git a/stash-web/src/App.css b/stash-web/src/App.css index fcdbe53..4bf5a1e 100644 --- a/stash-web/src/App.css +++ b/stash-web/src/App.css @@ -159,6 +159,29 @@ padding-bottom: var(--su-space-10); } +/* 顶部渐隐:sticky 固定在滚动区顶端,内容从下面淡出而不是被硬切 */ +.content-veil { + position: sticky; + top: 0; + z-index: 5; + height: 32px; + margin-bottom: -32px; + pointer-events: none; + opacity: 0; + background: linear-gradient(to bottom, var(--su-bg-page) 0%, transparent 100%); + transition: opacity var(--su-duration-fast) var(--su-ease-in-out); +} + +.content-veil.is-visible { + opacity: 1; +} + +@media (prefers-reduced-motion: reduce) { + .content-veil { + transition: none; + } +} + .sidebar { display: flex; flex-direction: column; diff --git a/stash-web/src/App.tsx b/stash-web/src/App.tsx index eea80d0..60a19c7 100644 --- a/stash-web/src/App.tsx +++ b/stash-web/src/App.tsx @@ -289,6 +289,9 @@ export default function App() { } >