We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f23028e commit e79c8b7Copy full SHA for e79c8b7
packages/docs/docs/zh/theme/default-theme-config.md
@@ -508,16 +508,20 @@ pageClass: custom-page-class
508
---
509
```
510
511
-然后你就可以写专门针对该页面的 CSS 了:
+只能在 `.vuepress/styles/index.styl` 中编写针对该页面的 CSS :
512
513
``` css
514
-/* .vuepress/override.styl */
+/* .vuepress/styles/index.styl */
515
516
.theme-container.custom-page-class {
517
/* 特定页面的 CSS */
518
}
519
520
521
+::: tip 注意
522
+自定义样式应该写在 [index.styl](/config/#index-styl) 内, 该文件可以让你方便地添加或覆盖样式.
523
+:::
524
+
525
## 特定页面的自定义布局
526
527
默认情况下,每个 `*.md` 文件将会被渲染在一个 `<div class="page">` 容器中,同时还有侧边栏、自动生成的编辑链接,以及上 / 下一篇文章的链接。如果你想要使用一个完全自定义的组件来代替当前的页面(而只保留导航栏),你可以再次使用 `YAML front matter` 来指定这个组件。
0 commit comments