jquery simplemodal 插件:随页面滚动的弹出窗口

发布于 2024-09-16 15:54:49 字数 279 浏览 5 评论 0原文

是否有一个“有效”的解决方案让对话框随滚动条滚动,而不是仍然从内部窗口边界的中心固定?

在某些情况下,用户的分辨率可能太小而无法包含对话框,在这种情况下,部分对话框可能会被隐藏。 您可能在隐藏部分有一个确定或确认按钮,然后弹出窗口可能不会关闭,也不会验证!阻塞情况。

我尝试将 css 从固定更改为绝对代码,然后对话框随页面滚动:太棒了!但是......同时这样做,打开另一个弹出窗口,不要再次将其放置在布局的中心。也许解决方案是在每个 onOpen 事件上将对话框置于中心位置。

欢迎任何帮助。

Is there a 'valid' solution for the dialog to scroll with the scrollbar instead of still being fixed from the center of the inner window bound ?

There is some situation where the user may have a too small resolution to contain the dialog, and in that case part of the dialog maybe hidden.
You may have a Ok or confirm button in the hidden part, and then the popup may not be closed, nor validated ! Blocking situation.

I tried to change a css into the code from fixed to absolute, and then the dialog scroll with the page: great! But... Meanwhile doing this, opening another popup, do not position it again centered into the layout. Maybe a solution is to recenter the dialog on each onOpen event.

Any help welcome.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

故人的歌 2024-09-23 15:54:49

该对话框被编写为固定的,因此不容易更改。

您可以将位置更改为绝对位置,但所有 IE 黑客都会强制其行为固定。

The dialog was written to be fixed and as such is not easily changeable.

You could change the position to absolute, but all of the IE hacks will force it to behave as fixed.

九命猫 2024-09-23 15:54:49

在 SimpleModal 1.4.2 中,您可以简单地将fixed 设置为 false:

$('#myModal').modal({ fixed: false });

这对我们在 Chrome 和 IE 上一直有效,一直到 IE8 都有效。 (我们不支持 IE7。)

In SimpleModal 1.4.2 you can simply set fixed to false:

$('#myModal').modal({ fixed: false });

This worked for us on Chrome and IE all the way back to IE8. (We don't support IE7.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文