diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index 967d18f..e91564d 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -38,6 +38,24 @@ font-size: 1.18rem; } +/* ---- 章节引导标题(如 2.2 / 2.2.1):与 h1 同款样式,并去掉上分隔线 ---- */ +.gb-chapter-lead .vp-doc h2 { + margin-top: 2.4rem; + padding-top: 0; + border-top: none; + font-size: 1.9rem; + line-height: 1.3; +} + +.gb-chapter-lead .vp-doc h2:first-of-type { + margin-top: 0; +} + +/* ---- 该页 Step 标题:与其它页 h2 级 Step 保持一致的视觉尺寸 ---- */ +.gb-chapter-lead .vp-doc h3[id^='step-'] { + font-size: 1.42rem; +} + /* ---- 正文图片:统一卡片化,响应式 ---- */ .vp-doc img { display: block; @@ -127,6 +145,12 @@ /* ---- 移动端 ---- */ @media (max-width: 640px) { + .gb-chapter-lead .vp-doc h2 { + font-size: 1.5rem; + } + .gb-chapter-lead .vp-doc h3[id^='step-'] { + font-size: 1.22rem; + } .vp-doc h1 { font-size: 1.5rem; }