fix: overflow-x-hidden 改为 overflow-x:clip 修复 sticky 吸顶

overflow-x:hidden 会创建滚动容器导致 position:sticky 失效,
改用 overflow-x:clip 裁剪溢出但不破坏 sticky 定位。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-02 00:15:38 +08:00
parent c5ee78e892
commit 787fa27949
3 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ export function Shell({ modules }: { modules: ModuleConfig[] }) {
</nav>
{/* 内容区 */}
<main className="flex-1 md:ml-16 pb-16 md:pb-0 min-w-0 overflow-x-hidden">
<main className="flex-1 md:ml-16 pb-16 md:pb-0 min-w-0" style={{ overflowX: 'clip' }}>
{ActiveComponent && <ActiveComponent />}
</main>