Skip to content

Commit

Permalink
Update Vitepress theme to make navigation bar transparent when scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
Leetfs committed Sep 7, 2024
1 parent 56cda1d commit 209f2ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,15 @@
.VPButton.medium {
border-radius: 8px !important;
}


/* 使用更高优先级覆盖导航栏背景 */
header.vp-nav, header.vp-nav.sticky {
background-color: transparent !important; /* 强制覆盖背景颜色 */
box-shadow: none !important; /* 移除阴影 */
}

/* 如果导航栏使用了自定义 class 例如 .sticky-active 或其他名称时,也覆盖 */
header.vp-nav.sticky-active {
background-color: transparent !important;
}

0 comments on commit 209f2ac

Please sign in to comment.