twitter-bootstrap与jquery-mobile

问题描述:

我想知道是否有人可以就更好"提供一些建议. Twitter-bootstrap还是JQuery mobile?

I'm wondering if someone can give some advice as to which is 'better'. Twitter-bootstrap or JQuery mobile?

谢谢, -彼得

我不知道您是否可以回答更好"的问题,因为它们具有不同的用途. Bootstrap是很棒的通用CSS库,而jQueryMobile更接近框架.意味着jQueryMobile不仅使您的页面看起来更好-还提供了许多面向移动设备的功能-滑动事件,页面过渡,允许单页面应用程序(因为它将仅显示data-role ='的一个div一次),AJAX预加载和历史记录API,以及许多易于触摸的组件/小工具.引导程序最主要是一个CSS库,主要用于台式机,但它也可以在移动设备上使用,特别是因为2.0内置了媒体查询功能.引导程序将无法帮助您使用友好的列表,复选框,选择菜单等.

I don't know if "better" is something you can answer since they serve different purposes. Bootstrap is great all-purpose CSS library whereas jQueryMobile is closer to a framework. Meaning jQueryMobile doesn't just make your pages look nice- it gives a lot of mobile oriented features such as- swipe-events, page transitions, allows for single page applications (since it will only show a single div with data-role='page' at a time), AJAX preload and history API, and lots of touch friendly components/widgets. Whereas bootstrap is foremost a CSS library mostly for desktop but works on mobile as well especially since 2.0 comes with media queries built in. Bootstrap will not help you with touch friendly lists, checkboxes, select menu's, etc.

还有一点要指出,jQueryMobile使用您的标记并使用JavaScript将其修饰为各种漂亮的东西. Bootstrap具有一些javascript,但仅适用于可选组件,其余为CSS.

One more thing to point out, jQueryMobile takes your markup and dresses it with all sorts of pretty stuff using JavaScript. Bootstrap has some javascript, but only for optional components, the rest is CSS.

因此,回答恕我直言-如果您正在制作明确打算主要在移动设备上使用的Web应用程序,请与jQueryMobile一起使用; Bootstrap还有其他功能-真的很棒.

So to answer IMHO- if you're a making a web application that you explicitly plan on using primarily on mobile devices go with jQueryMobile; Anything else go with Bootstrap- it's really quite awesome.