Skip to content

Commit ec43d1e

Browse files
feat: 添加固定顶部导航和右侧面板粘性效果
Signed-off-by: wangsimiao1 <wangsimiao1@xiaomi.com>
1 parent 56359b4 commit ec43d1e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

assets/css/jekyll-theme-chirpy.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,18 @@ html {
1919
html::-webkit-scrollbar {
2020
display: none; /* Chrome, Safari, Opera */
2121
}
22+
23+
/* Keep topbar sticky at the top (stays within main-wrapper, won't overlap sidebar) */
24+
#topbar-wrapper {
25+
position: -webkit-sticky;
26+
position: sticky;
27+
top: 0;
28+
z-index: 1030;
29+
}
30+
31+
/* Keep right panel (trending tags + recent updates) always sticky */
32+
#panel-wrapper > .access {
33+
position: -webkit-sticky !important;
34+
position: sticky !important;
35+
top: 5rem;
36+
}

0 commit comments

Comments
 (0)