Jquery - Fancybox - 背景页面转移问题 [英] Jquery - Fancybox - Background Page Shift Issue

查看:309
本文介绍了Jquery - Fancybox - 背景页面转移问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Fancybox载入良好,一切都打开,因为我想要它,但问题发生在后台 - 它是可见的(和令人不安),我的整个页面移动正好8像素向右,当框加载并恢复正常

Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.

我无法链接到网站,因为它位于我们公司防火墙后面的开发服务器上。

I can't link to the site as it's on a dev server behind our company firewall.

我使用以下脚本:Fancybox,Quform和Jquery Banner Rotator。 fancybox调用发生在旋转器内部。我没有修改原来的jquery fancybox CSS的任何宽度/高度。

I'm using the following scripts: Fancybox, Quform, and Jquery Banner Rotator. The fancybox call is occurring inside the rotator. I haven't modified any widths/heights of the original jquery fancybox CSS.

我将body宽度设置为100%,边距设置为自动,内部div最小宽度为1138像素,边距设置为自动。

I have the body width set to 100% and margin set to auto, and internal divs with a min-width of 1138px and margin set to auto.

有人知道我应该在哪里修复这个问题吗?

Does anyone know where I should look to fix the issue?

推荐答案

我最近有一个非常类似的情况下Fancybox v2。我的初始页面的内容低于折叠,因此有一个滚动条(也许OP也一样,它不清楚)。激活Fancybox链接导致页面主体和清除滚动条的相同位移;

I had a very similar situation recently with Fancybox v2. My initial page had content below the fold and therefore had a scrollbar (perhaps the OP did as well, it's not clear). Firing the Fancybox link caused the same shift in page body and clearing the scrollbar; closing the Fancybox image shifted the body back and re-enabled the scrollbar.

.fancybox-lock 的调整

helpers: { 
    overlay: { 
        locked: false 
    } 
}

只有警告,这是不锁定你的Fancybox到页面的中心,如果你有滚动,即,与Fancybox视图的页面是完全可滚动的。对我来说,这是两个邪恶中较小的。

The only caveat is this does not lock your Fancybox to the center of the page if you had scrolling, i.e. the page with Fancybox view is entirely scrollable. For me, it was the lesser of two evils.

这篇关于Jquery - Fancybox - 背景页面转移问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆