我的wordpress网站有一个问题,它使用Lightbox(WP Lightbox 2)插件及其创建的叠加层。 更具体地说,当我点击Firefox中的图像时,叠加显示在滚动的位置,适合浏览器。 但是,如果我点击Chrome或Edge中的图片,则叠加层会保留在页面顶部,并且由于某种原因不会向下滚动。 如果它只是css,我将能够修复它,但似乎lightbox类的“顶部”值是通过js以某种方式定义的,我不知道是什么导致了这种差异。 现在它在Firefox中是不同的 - 在顶部添加适当数量的“空间”,而在Chrome中它除了常规填充值之外不添加任何内容。 所以整个事情都在最重要的位置。 显然,我需要打开一个灯箱覆盖图,滚动页面位于页面上,而不仅仅是在顶部。
这是您可以尝试使用的页面的链接,只需向下滚动并单击Chrome中的图像,如果Firefox,您将看到我的意思。
http://mnabievart.com/deck-of-card-design/
I have an issue with my wordpress website which uses the Lightbox (WP Lightbox 2)plugin and the overlay it creates. More specifically when I click on the image in Firefox the overlay appears right where the scroll is, fitting the browser. But if I click on the image in Chrome or Edge, the overlay stays on top of the page and does not scroll down for some reason. If it was just css, I would be able to fix it, but it seems that "top" value for lightbox class is defined via js somehow and I have no idea what causes that difference. Right now it is different in Firefox - adding a proper amount of "space" on top, and in Chrome it doesn't add anything but a regular padding value. So the whole thing sits on top. Obviously I need to have a lightbox overlay open where the scroll is on the page, not just on top.
Here is the link to the page you can try it on, just scroll down and click on the images in Chrome and if Firefox and you will see what I mean.
http://mnabievart.com/deck-of-card-design/
最满意答案
添加此样式并尝试
.lightGallery { overflow: visible !important; }和
#lightGallery-outer{ top:-50px }Add this style and try
.lightGallery { overflow: visible !important; }and
#lightGallery-outer{ top:-50px }更多推荐
Chrome,Firefox,顶部,滚动,电脑培训,计算机培训,IT培训"/> <meta name="descript
发布评论