fix: 双栏非对称吸底滚动与对齐

- 去掉首页侧栏额外 padding,左右两栏初始顶部对齐
- 隐藏 #page-scroll 滚动条
- 左侧到底后用 translateY 补偿吸附在视口底部,右侧继续滚动;右侧先到底时两栏同步
- ResizeObserver 重算吸附阈值
- 验证:初始 top 148/148;滚动后左栏 top 144 固定、bottom 900;无滚动条
This commit is contained in:
2026-10-31 15:51:57 +08:00
parent 54fd0edf84
commit 4304fd75b4
4 changed files with 46 additions and 2 deletions
+15
View File
@@ -1299,6 +1299,21 @@ a.entry-href:hover {
min-width: 0;
}
/* 首页:左右栏共用一个滚动区,左侧到底后吸底 */
#page-scroll {
scrollbar-width: none;
-ms-overflow-style: none;
}
#page-scroll::-webkit-scrollbar {
display: none;
}
.sidebar-home {
padding-top: 0;
will-change: transform;
}
.sidebar-divider {
margin: var(--su-space-2) 0;
border-top: 1px dashed var(--su-border-strong);