在 iPhone/iPad 上的灯箱内滚动
我开发了一个网站,当单击某些图像时,该网站会在灯箱中显示完整的网页 - 页面与图像相关。这些页面位于 IFRAME 内,该 IFRAME 位于灯箱的内容 div 内。
问题是这样的:当灯箱内的页面长于灯箱的高度并且在 iPhone/iPad 上查看网站时,似乎无法滚动内部页面 - 滚动手势会滚动最外层页面(灯箱覆盖的那个)。 Mobile Safari 没有滚动条,完全依靠手势进行滚动,因此内部/覆盖的灯箱 IFRAME 似乎无法滚动。
对此有什么解决办法吗?我是否需要特殊情况的移动浏览器并打开一个新的浏览器窗口或完全导航到 IFRAME 页面而不是使用灯箱?
这似乎是移动端 Safari 的一个真正的缺点!
(不是真正相关,但可能有用的信息 - 该网站基于 Drupal;灯箱是 Lighbox2 模块。)
I developed a website which displays full webpages within a lightbox when certain images are clicked - the pages relate to the images. The pages are inside an IFRAME which is inside the lightbox's content div.
The problem is this: when the page inside the lightbox is longer than the height of the lightbox and the site is being viewed on iPhone/iPad, there appears to be no way to scroll the interior page - scrolling gestures scroll the outermost page (the one that the lightbox is overlaying). Mobile Safari has no scrollbars, depending entirely on gestures for scrolling, so the interior/overlayed lightbox IFRAME seems to be unscrollable.
Are there any solutions to this? Do I need to special-case mobile browsers and open a new browser window or navigate entirely to the IFRAME'd page instead of using the lightbox?
This seems to be a real shortcoming of mobile Safari!
(Not really relevant but perhaps useful info - the site is Drupal-based; the lightbox is the Lighbox2 module.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然没有解决移动浏览器上不引人注目的内容这一相当严重的问题,但我想提一下,您通常可以用两根手指滚动/滑动来滚动此类内容。
至于你的情况,我会做一个移动浏览器检测并向用户展示一个新的浏览器窗口。
While not addressing the pretty serious problem of unnoticeable content on mobile safari, I would like to mention you can usually scroll this kind of content with a two-fingered scroll/swipe.
As for your case, I would do a mobile browser detect and present the user with a new browser window.