Fancybox - 滚动/页面位置
我试图在打开 fancybox iframe 时自动滚动到锚点,如下所示:www.example.com/posts#header。
它有点工作,但它滚动到错误的位置,要么太远,要么太远(大多是太远)。
我尝试使用 jQuery ScrollTo 插件,但它也会滚动到错误的位置,并且还会将页面从 fancybox“弹出”到整个窗口。
如果您提供有关如何实现此功能的任何提示,我们将不胜感激!
I am trying to automatically scroll to a anchor when opening a fancybox iframe like so: www.example.com/posts#header.
It kinda works but it scrolls to the wrong position, either too far up or way too far down (mostly way too far down).
I tried using the jQuery ScrollTo plugin but it also scrolls to the wrong position and additionally "pops out" the page from the fancybox to the whole window.
Would be thankful for any tips on how to get this working!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论