惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
B
Blog RSS Feed
Last Week in AI
Last Week in AI
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Security Blog
Microsoft Security Blog
博客园 - 三生石上(FineUI控件)
Y
Y Combinator Blog
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
雷峰网
雷峰网
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园 - 司徒正美
U
Unit 42
量子位

Hyde Blog

Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog Hyde Blog
Hyde Blog
Hyde · 2025-10-05 · via Hyde Blog

导航栏毛玻璃 ​

创建 ​

vitepress-theme-Teek\src\styles\vp-plus 文件夹,然后新建 nav-blur.scss 并填入如下代码

scss

.
├─ docs
├─ vitepress-theme-Teek
│  │  └─ src
│  │     └─ style
│  │        └─ vp-plus
│  │          └─ nav-blur.scss
└─ node_modules

在主题原始文件中, VPNavBar.vue 组件有其对应的属性

配置 ​

复制下面代码,粘贴到 nav-blur.scss 中,可以自行增减

scss

/* .vitepress-theme-Teek\src\styles\vp-plus\blur.css */
:root {
  /* 首页下滑后导航透明 */
  .VPNavBar:not(.has-sidebar):not(.home.top) {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
  }

  /* 搜索框透明 */
  .DocSearch-Button {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
  }

  /* Feature透明 */
  .VPFeature {
    border: none;
    box-shadow: 0 10px 30px 0 rgb(0 0 0 / 15%);
    background-color: transparent;
  }

  /* 文档页侧边栏顶部透明 */
  .curtain {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
  }

  @media (min-width: 960px) {
    /* 文档页导航中间透明 */
    .VPNavBar:not(.home.top) .content-body {
      background-color: rgba(255, 255, 255, 0);
      backdrop-filter: blur(10px);
    }
  }

  /* 移动端大纲栏透明 */
  .VPLocalNav {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
  }
}

引入 ​

最后在Demo\docs-base\.vitepress\theme\index.ts 引入 即可看到效果

ts

import "vitepress-theme-Teek/vp-plus/nav-blur.scss"; //导航栏毛玻璃