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 8226a4b commit 1b40668
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
* - `danger`: Used to show error, or dangerous message to the users. Used
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */
.vp-nav {
background-color: transparent; /* 设置导航栏背景为透明 */
box-shadow: none; /* 移除默认的阴影(如果有) */
}

/* 当页面滚动时,保持导航栏透明 */
.vp-nav.sticky {
background-color: transparent; /* 使固定的导航栏也保持透明 */
}


:root {
--vp-c-default-1: var(--vp-c-gray-1);
Expand Down

0 comments on commit 1b40668

Please sign in to comment.