Using Bootstrap with jQuery Mobile

吃可爱长大的小学妹 提交于 2019-12-18 10:52:14

问题


Both Bootstrap (v2) and jQuery Mobile (v1.1 RC1) provides building blocks that I want to use for my application.

Bootstrap is clean, simple and wonderful. However, it lacks jQuery Mobile's extremly simple & customizable "List View" which I need to create mobile web applications.

From my simple test, they get in each other's way (messing up some layouts, paddings, sizes, etc).

So, my questions:

  1. Can we use both Bootstrap and jQuery Mobile on the same HTML page?
  2. If we can't combine them, what is Bootstrap's answer to jQuery Mobile's "List Views"?

回答1:


Answer to 1.

What about jquery-mobile-bootstrap-theme? (from author)

Is a theme for jquery-mobile, it has no bootstrap.

Also, if you want bootstrap, just add bootstrap's css to your webpage, the styles should not collide with jquery mobile, unless you use bootstrap's ids in divs.

You could also override bootstrap's css for small displays to use jquery-mobile. See this.

// Landscape phones and down
@media (max-width: 480px) { ... }

Answer to 2.

I think you are looking for bootstrap's 3 list group linked



来源:https://stackoverflow.com/questions/9599110/using-bootstrap-with-jquery-mobile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!