gpt4 book ai didi

html - 从 Markdown 生成的 HTML 中的 Shift anchor 标记,作者:Jekyll

转载 作者:行者123 更新时间:2023-11-28 08:34:49 25 4
gpt4 key购买 nike

我正在处理的网站在顶部有一个固定的导航栏。这弄乱了 anchor 标签的定位。我知道 standard solution解决这个问题,但我不确定如何在这里应用它。

Markdown 来源:

Go to [closing notes](#closing-notes).

### Closing Notes

Jekyll 生成的 HTML:

<p>Go to <a href="#closing-notes">closing notes</a>.</p>

<h3 id="closing-notes">Closing Notes</h3>

非常感谢任何想法。

最佳答案

刚刚发现 this post 中概述的方法 D在我的情况下工作正常,因为我不需要 border-topmargin-top:

h3 {
border-top: 50px solid transparent;
margin-top: -50px;
}

关于html - 从 Markdown 生成的 HTML 中的 Shift anchor 标记,作者:Jekyll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28096195/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com