jQuery 的 blockUI 有什么替代方案吗?
这个问题说明了一切! 我正在寻找一种易于使用的 jQuery blockUI 替代品。 几天来我一直在尝试在 FireFox 和 IE 中将带有 blockUI 的对话框居中,但没有机会。 这不起作用。 我查看了有关将 blockUI 对话框居中的问题(如何使用 jQuery 和 blockUI 让 DIV 位于页面中心?)但它仅适用于 Firefox。
The question says it all! I am looking for an easy to use alternative of blockUI for jQuery. I've been trying for days to center a dialog box with blockUI in both FireFox and IE but no chance. It doesn't work. I looked at this question about centering a blockUI dialog box (How can I get a DIV to centre on a page using jQuery and blockUI?) but it works only with Firefox.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能想检查此插件调用 jQuery MSG。 它在包括 ie6 在内的大多数浏览器中运行良好。 而且它的重量非常轻,未压缩时只有 4k,带有代码注释。
示例代码
演示页面
github
完整文档和用法请查看 这篇文章
或者如果你只是想集中一些 DOM 元素,你可以看看这个 jQuery 中心插件
you might want to check this plugin call jQuery MSG. It works great in most of the browsers including ie6. And it is very light weight, only 4k uncompressed with code comments.
Example code
Demo page
Source code on github
Full documentation and usage please check this post
or if you just want to centralize some DOM element you can take a look at this jQuery Center plugin
对于对话框,我已从 blockUI 切换到 Jquery UI。 我认为这样更好。
For dialog boxes, I have switched from blockUI to Jquery UI. I think it's better.
这是我遇到并稍作修改的扩展。 现在看,我认为它实际上有点乱,可以使用清理(我认为有一些未使用的变量)
用法:
Here's an extension which I came across and modified slightly. Looking at it now, I think it's actually a bit messy and could use a clean up (there's some unused variables I think)
Usage:
如果问题是由于加载尺寸插件和最新版本的 jQuery 引起的,则尺寸在几个版本前已合并到核心中并导致冲突。
In case the problem is caused by loading the dimensions plugin along with the latest version of jQuery, then Dimensions was merged into the core a few versions ago and was causing a conflict.
来自文档:
为什么我在 Linux 上的 FF 中看不到覆盖?
有几个人告诉我,FF/Linux 中的全页不透明渲染速度非常慢,因此默认情况下该平台禁用它。 您可以通过重写 applyPlatformOpacityRules 属性来启用它,如下所示:
From the documentation:
Why don't I see overlays in FF on Linux?
Several people informed me that full page opacity rendering in FF/Linux is crazy slow, so by default it's disabled for that platform. You can enable it by overriding the applyPlatformOpacityRules property like this: