Typora大纲突出显示设置

先确认内置定位功能可用:

  • 在左侧大纲空白处右键;
  • 选择 突出显示当前标题(Highlight Current Header)。
    Typora 在滚动正文时会自动标记当前章节;如果侧栏没跟随定位,右键点一次这个菜单可快速找到它。官方大纲说明

然后设置圆角样式:

  1. 打开 文件 → 偏好设置 → 外观 → 打开主题文件夹。
  2. 在打开的文件夹中,新建文件:base.user.css
    已存在就直接在文件末尾追加。
  3. 粘贴以下代码并保存:
css 复制代码
/* Typora 左侧大纲:当前章节使用圆角胶囊高亮 */

#outline-content .outline-item-wrapper.outline-active,
#outline-content .outline-item-wrapper.outline-item-active {
  background: transparent !important; /* 去掉主题原有的整行方形背景 */
}

/* 兼容不同 Typora 版本与主题的当前标题选择器 */
#outline-content .outline-item-wrapper.outline-active > .outline-item,
#outline-content .outline-item-wrapper.outline-item-active > .outline-item,
#outline-content .outline-item.outline-active,
#outline-content .outline-item.outline-item-active {
  margin: 3px 8px 3px 4px !important;
  padding-right: 8px !important;
  border-radius: 999px !important; /* 大圆角/椭圆形 */
  background: rgba(126, 146, 196, 0.72) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* 标题文字与折叠箭头同步突出 */
#outline-content .outline-item-wrapper.outline-active .outline-label,
#outline-content .outline-item-wrapper.outline-item-active .outline-label,
#outline-content .outline-item.outline-active .outline-label,
#outline-content .outline-item.outline-item-active .outline-label {
  color: #ffffff !important;
  font-weight: 700 !important;
}
  1. 关闭并重新打开 Typora,或切换一次主题使 CSS 重新加载。
    你可以按喜好改这里的颜色:
css 复制代码
background: rgba(126, 146, 196, 0.72) !important;

例如深色主题下我会推荐:

css 复制代码
background: #536d9d !important; /* 蓝灰色,更醒目 */
相关推荐
月月如常13 天前
Typora 粘贴图片时 PicGo 弹窗的解决方案
macos·typora·picgo
hanbr1 个月前
Mysql之表的约束详解
typora·csdn·markdown开源工具
_院长大人_1 个月前
使用 GitHub 作为图床:PicGo + Typora 自动上传完整教程
github·typora·picgo·图床
水巷石子2 个月前
目前最新版本PicGo上传图片到gitee仓库具体配置
gitee·上传·typora·picgo·图片
小徐敲java2 个月前
Typora破解
typora
吴声子夜歌2 个月前
Typora——段落排版
typora·markdown
大数据张老师3 个月前
Typora 导出 Word 模版操作手册
开发语言·c#·word·typora
华科大胡子4 个月前
Typora插件开发指南:打造专属IDE式写作环境
typora