Lightbox Overlay不会在Chrome或Edge中向下滚动(Lightbox Overlay doesn't scroll down in Chrome or Edge)

系统教程 行业动态 更新时间:2024-06-14 17:02:18
Lightbox Overlay不会在Chrome或Edge中向下滚动(Lightbox Overlay doesn't scroll down in Chrome or Edge)

我的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

本文发布于:2023-04-21 19:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/f0e1f303abca56dd0d2ca8a399970b30.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:会在   Overlay   Lightbox   scroll   Edge

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!