【发布时间】:2011-11-23 05:32:06
【问题描述】:
我想滚动到锚点上方 20 像素的位置。最好的解决方案是什么?
编辑:我将使用scrollTo with jquery。无法计算出 window.location.hash。
【问题讨论】:
-
您还需要这样做吗?我错过了编辑,请参阅。
标签: javascript jquery html scroll anchor
我想滚动到锚点上方 20 像素的位置。最好的解决方案是什么?
编辑:我将使用scrollTo with jquery。无法计算出 window.location.hash。
【问题讨论】:
标签: javascript jquery html scroll anchor
例如,滚动到锚点(可能通过设置window.location.hash)然后执行window.scrollBy(0, -20)。
【讨论】: