Fancybox 停止滚动到中心
我希望 fancybox 实际上随页面滚动,这样我就可以看到整个 fancy 框。目前它滚动到中心,因此如果您的屏幕较小,则无法看到所有内容。我更改了 centerOnScroll 选项,但没有效果。
请帮忙。 谢谢
I want the fancybox to actually scroll with the page so I can see the whole of the fancy box. Currently it scrolls to the center, so if you have a small screen you can't see all the content. I have changed the centerOnScroll option but it has had no effect.
Please help.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
列表项
也是答案之一
List item
Also one of the Answer
如果是 iphone 或 iPod,则只需禁用居中功能:
只需将以下代码添加到 jquery.fancybox-1.3.4.js 中 $.fancybox.center 函数的顶部
,这将防止盒子在 iphone 上弹起, iPod触摸。但您必须更改脚本的 url 以指向此文件,或者必须重新打包此代码。
You just have to disable centering if it is an iphone or an ipod:
Just add the following code to the top of the $.fancybox.center function in jquery.fancybox-1.3.4.js
This will prevent the box's bouncing on iphone and ipod touch. but you have to change the url of the script to point to this file or you have to repack this code.
我目前在项目中使用 fancybox 作为模式,具有以下设置。这些设置使内容保持固定并允许页面滚动。
除此之外,请发布一些您的脚本和标记,也许我可以提供一些进一步的帮助。
I am currently using fancybox for the modal's in a project with the following settings. These settings make the content remain fixed and allows scrolling of the page.
Beyond this please post some of your script and markup and maybe I can be of some further help.
发现了恶意代码。这是针对 iPhone 的修复,我只是将其注释掉了......
Found the rogue piece of code. It was for an iphone fix and I just commented it out...
在 Fancybox 2.0 中,有一个新选项可用于允许框随页面滚动:
In Fancybox 2.0, there is a new option that can be used to allow the box to scroll with the page: