jquery simplemodal 插件:随页面滚动的弹出窗口
是否有一个“有效”的解决方案让对话框随滚动条滚动,而不是仍然从内部窗口边界的中心固定?
在某些情况下,用户的分辨率可能太小而无法包含对话框,在这种情况下,部分对话框可能会被隐藏。 您可能在隐藏部分有一个确定或确认按钮,然后弹出窗口可能不会关闭,也不会验证!阻塞情况。
我尝试将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该对话框被编写为固定的,因此不容易更改。
您可以将位置更改为绝对位置,但所有 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.
在 SimpleModal 1.4.2 中,您可以简单地将fixed 设置为 false:
这对我们在 Chrome 和 IE 上一直有效,一直到 IE8 都有效。 (我们不支持 IE7。)
In SimpleModal 1.4.2 you can simply set fixed to false:
This worked for us on Chrome and IE all the way back to IE8. (We don't support IE7.)