测试 固定的顶中间
回复讨论(解决方案)
参考:
offsetting an html anchor to adjust for fixed header
JQuery Position:Fixed 'NAVBAR' by scrolling the page
给锚点加上个下面的样式,纯css实现。
a.anchor{ display: block; position: relative; top: -92px; visibility: hidden;} 另外如果需要加上平滑滚动效果的话,可以点击查看
在线 演示结果
或者在线 演示代码
存贴备用, 实际效果地址
非常感谢您的热情回复!!!
参考:
offsetting an html anchor to adjust for fixed header
JQuery Position:Fixed 'NAVBAR' by scrolling the page
给锚点加上个下面的样式,纯css实现。
a.anchor{ display: block; position: relative; top: -92px; visibility: hidden;} 另外如果需要加上平滑滚动效果的话,可以点击查看
在线 演示结果
或者在线 演示代码











