fix: 文档目录 sticky 跟随滚动

祖先 overflow-x:hidden 改为 clip, 修复 sticky 失效
This commit is contained in:
root committed 2026-10-12 00:34:33 +08:00
1 parent c0f75f69a6
commit b4a20080dd
1 file changed
+5 -1
+5 -1
View File
@@ -450,7 +450,7 @@ onUnmounted(() => {
<style scoped>
.docs-app {
position: relative; min-height: 100vh; overflow-x: hidden;
position: relative; min-height: 100vh; overflow-x: clip;
background: linear-gradient(135deg, #f5f7fc 0%, #eef1fb 45%, #f8f5ff 100%);
}
.bg-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
@@ -501,8 +501,12 @@ onUnmounted(() => {
align-items: start;
}
.docs-nav {
position: -webkit-sticky;
position: sticky;
top: 20px;
z-index: 5;
max-height: calc(100vh - 40px);
overflow-y: auto;
background: rgba(255,255,255,.82);
backdrop-filter: blur(14px);
border: 1px solid rgba(255,255,255,.9);