始终在窗口中打开 jQuery UI 模型表单

发布于 2024-12-24 23:07:02 字数 309 浏览 3 评论 0原文

全部, 我正在使用 jQuery UI 模态表单,它对我来说非常好用,除了一件事。有时它会打开,所以只有一半在活动窗口中,另一半在页面下方,我必须将其向上拖动,以便整个表单都在那里。我只更改了 CSS 中的一些表单元素和颜色,但在大小调整方面没有做任何其他事情,我还将高度和宽度从 300 和 350 更改为 550 和 600。

如何确保模态表单始终在当前窗口空间中打开而不是仅打开一半并确保每次都会发生这种情况?

谢谢!

All,
I'm using the jQuery UI Modal Form which opens up very nicely for me except for one thing. Sometimes it opens up so only half of it is in the active window and the other half is below the page and I have to drag it up so that the whole form is there. I only changed some of the form elements and colors in the CSS but didn't do anything else in terms of sizing and I also changed the height and width from 300 and 350 to 550 and 600.

How can I ensure that the modal form always opens up in the current window space instead of only half and make sure this happens each time?

Thanks!

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

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

发布评论

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

评论(1

季末如歌 2024-12-31 23:07:02

当您启动 jQuery 对话框时,它会尝试在页面上居中。我要检查的第一件事是您的 HTML 和 BODY 元素不大于默认大小。使用firebug检查是否有任何样式或DOM属性导致HTML和BODY元素大于100%。我通常喜欢像这样重置它们......

html { width:100%; height:100%; }
html, body { margin:0; padding:0; }

When you launch the jQuery Dialog, it tries to center on the page. The first thing I would check is that your HTML and BODY elements are not larger than the default size. Use firebug to check if there are any styles or DOM attributes causing the HTML and BODY elements to be larger than 100%. I usually like to reset them like this...

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