我不确定问/寻找这个问题的最佳方式:
当你点击一个锚链接时,它会把你带到页面的那一部分,链接到的区域现在位于页面的顶部。我希望锚链接发送我到该页面的一部分,但我想在顶部的一些空间。因为,我不希望它发送给我的链接-与它在非常顶部的一部分,我希望100像素左右的空间有。
这说得通吗? 这可能吗?
编辑显示代码-它只是一个锚标签:
<a href="#anchor">Click me!</a>
<p id="anchor">I should be 100px below where I currently am!</p>