gpt4 book ai didi

ios - 在 iPad 上更改方向后 Fancybox 无法正确重新定位

转载 作者:行者123 更新时间:2023-11-28 18:33:28 24 4
gpt4 key购买 nike

当我将我的 iPad 从纵向旋转到横向再旋转回纵向时,fancybox 图像在左侧有一个神秘的填充。另外,在改变旋转之前,我不能向左或向右滚动,之后我可以向左滚动。请引用图片(观察背景!)以获得更好的理解。

This is the screen before changing rotations This is the screen after changing rotations This is the screen after scrolling to the left

我已经尝试过的是添加fancybox的重定位方法:

$(window).bind('orientationchange', function(event) {
$.fancybox.reposition();
});

有没有人以前经历过这种情况,或者能猜出它可能来自哪里?任何帮助将不胜感激。

最佳答案

在尝试使用 jQuery Mobile 并调用 Fancy Box 中的各种函数后,我找到了一个非常简单的修复方法。

我只是将以下参数添加到我的 fancybox 初始化程序中:

autoCenter  : true

您可以在此处找到有关此设置的文档:http://fancyapps.com/fancybox/#docs

不能保证这会为您解决问题,但我希望如此!

PS:这可能至少需要 Fancy Box 的 2.1.5 版本。

关于ios - 在 iPad 上更改方向后 Fancybox 无法正确重新定位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23612290/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com