obsidian 中指定页面取消鼠标悬浮预览
1 前言¶
从鸟姐库中扒下来的 calendar 面板总有一个小小的痛点(对我来说)——在鼠标悬停的时候会弹出悬浮窗口,而我的 tasks 都是在指定文件夹当中的,并不需要这个预览功能,而且鼠标放在 calendar 任何地方都出现悬浮框的话很影响观感,还会引起电脑的卡顿。那么问题又来了,我不能把整个库的悬浮预览功能全关了,所以就想着能不能取消指定页面的悬浮预览功能,经过 GPT 的辅助我实现了想要的效果。
2 操作步骤¶
首先我们需要添加一段 CSS 代码到库中(具体怎么做这里就不细说了):
.no-hover-preview .internal-link:hover .popover {
display: none !important;
}
.no-hover-preview .internal-link {
pointer-events: none;
cursor: default;
}
随后我们在需要取消鼠标悬停预览功能的页面 yaml 区添加如下内容:
---
cssclass: no-hover-preview
---
最后打开 CSS 片段就可以了!