Fancybox 2滚动条消失,并且站点向右移动 [英] Fancybox 2 scrollbar disapears and site shifts to the right

查看:113
本文介绍了Fancybox 2滚动条消失,并且站点向右移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对fancybox 2有一个小问题.我现在正在编写代码,对不起,如果我要问愚蠢的问题.

I have a small issue with fancybox 2. I'm now to the coding stuff so sorry if I am going to ask stupid questions.

我在测试站点上使用了fancybox,但是当我单击图像时,将打开该框,并且背景中的整个页面都向右移动,并且滚动条消失了.我不要这种行为.滚动条应该在那里.

I got the fancybox working on the testsite but when I click on an image the box opens and the whole page in the background shifts to the right and the scrollbar disappears. I don't want this behaviour. The scrollbar should be there.

它在此站点上: http://elgaucho.lu/restaurant.php

你能帮我吗?

预先感谢

安迪

推荐答案

据我所知,您修改了原始的fancybox css文件.

As far as I can tell, you modified the original fancybox css file.

您从此处更改了167行

You changed the line 167 from this

.fancybox-lock {
    overflow: hidden;
}

进入此

.fancybox-lock {
    overflow: hidden;
    margin-right:0 !important;
}

...和第187行

.fancybox-lock .fancybox-overlay {
    overflow: auto;
    overflow-y: scroll;
}

进入此

.fancybox-lock .fancybox-overlay {
    overflow: hidden;
    overflow-y: hidden;
}

...所以也就不足为奇了(请记住,js文件还会动态更改某些css属性,因此仅更改css文件可能就无法完全控制)

... so no wonders (bear in mind that the js file also changes some css properties dynamically so you may not have full control just changing the css file)

通常来说,除非您非常确定自己在做什么,否则不要混淆原始文件,否则会产生意想不到的结果

Generally speaking you shouldn't mess with the original files unless you are pretty sure what you are doing, otherwise you will have unexpected results

这篇关于Fancybox 2滚动条消失,并且站点向右移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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