jQuery 布局管理器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/997314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 10:22:01  来源:igfitidea点击:

jQuery Layout Manager

jquerylayout-manager

提问by Karim

Has anyone had any experience with a jQuery-based layout manager? I know of only one (JX) but it's somewhat bloated for my needs. Any thoughts?

有没有人有过基于 jQuery 的布局管理器的经验?我只知道一个(JX),但它对于我的需要来说有点臃肿。有什么想法吗?

回答by Egil Hansen

I have used the Docking Layout Managerplugin with good success. Its pretty simple and fairly small, about 7 kb uncompressed.

我已经成功地使用了Docking Layout Manager插件。它非常简单且相当小,大约 7 kb 未压缩。

回答by Bastien

The Magic jQueryplugin at : http://www.jquery-css.com/magic-jqueryis a 31kb compressed web Layout managerand much more :

- fixed position
- Layout manager :align and limit elements position/movement between themeselves or with the screen
ex : http://www.jquery-css.com/web-layout-example.php
- very simple & generic menustuff (which enable carrousels, tabs megadropdown menu etc in 2 sec)
- inner-page messages
- highlight elements(popIn / popOut in front of a dark veil)

位于http://www.jquery-css.com/magic-jqueryMagic jQuery插件是一个31kb 压缩的 Web 布局管理器,还有更多: -固定位置-布局管理器:对齐和限制元素之间的位置/移动或与屏幕 示例:http: //www.jquery-css.com/web-layout-example.php - 非常简单和通用的菜单内容(可在 2 秒启用轮播、标签超级下拉菜单等) -内页消息-突出显示元素(黑色面纱前的 popIn / popOut)







all the best bastien


所有最好的巴斯蒂安

回答by Justin Niessner

Personally...I'd say stay away from jQuery for page layout management. You're far better off learning proper CSS layout or adopting a CSS layout framework like Blueprint.

就个人而言...我会说远离 jQuery 进行页面布局管理。学习正确的 CSS 布局或采用诸如Blueprint 之类的 CSS 布局框架会更好。

If you depend on jQuery (javascript) for page layout, there's a greater chance that your page is NOT going to fail gracefully. You also run the risk of users having Javascript disabled (in which case, even in a modern browser your page is going to fail).

如果您依赖 jQuery (javascript) 进行页面布局,则您的页面不会正常失败的可能性更大。您还面临着用户禁用 Javascript 的风险(在这种情况下,即使在现代浏览器中,您的页面也会失败)。

回答by Jordan Sitkin

I know that this will seem to be overkill for most scenarios, but for one very complex application I implemented the YUI Layout manager because it plays nice with YUI's fantastic and powerful DataTable component. It did, however, add a considerable amount of filesize overhead to the app.

我知道这对于大多数场景来说似乎有点矫枉过正,但是对于一个非常复杂的应用程序,我实现了 YUI 布局管理器,因为它与 YUI 出色而强大的 DataTable 组件配合得很好。但是,它确实为应用程序增加了大量的文件大小开销。

I have also used the 960 CSS grid system to meet certain layout needs and can highly recommend it! http://960.gs/

我也用过960的CSS网格系统来满足一定的布局需求,强烈推荐!http://960.gs/