Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在打开fancybox iframe 时自动滚动到锚点,如下所示:www.example.com/posts#header。
它有点工作,但它滚动到错误的位置,要么向上太远,要么向下太远(主要是向下太远)。
我尝试使用 jQuery ScrollTo 插件,但它也会滚动到错误的位置,并且还会将页面从fancybox“弹出”到整个窗口。
非常感谢您提供有关如何使其正常工作的任何提示!