Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/.vitepress/theme/style/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,27 @@
background-color: transparent;
}
}

// 滚动后导航栏玻璃模糊效果(VitePress 在顶部时添加 .top 类,滚动后移除)
.VPNavBar:not(.top) {
backdrop-filter: blur(15px) !important;
-webkit-backdrop-filter: blur(15px) !important;
background-color: rgba(255, 255, 255, 0.7) !important;
border-bottom-color: transparent !important;
transition: background-color 0.25s, backdrop-filter 0.25s !important;
}

.dark .VPNavBar:not(.top) {
background-color: rgba(15, 15, 15, 0.7) !important;
}

// 滚动后让内部子元素背景透明,确保 backdrop-filter 效果穿透显示
.VPNavBar:not(.top) .content-body,
.VPNavBar:not(.top) .title {
background-color: transparent !important;
}

.VPNavBar:not(.top) .divider-line,
.VPNavBar:not(.top) .divider {
background-color: transparent !important;
}
Loading