jQuery Mobile Themes
jQuery Mobile provides 2 different theme styles, from "a" to "b" - each theme has different colors for buttons, toolbars, content blocks, etc., and each theme has a different visual effect.
You can customize the appearance of the application by setting the data-theme attribute of elements:
按钮
| Value | Description | Example |
|---|---|---|
| a | The page has a gray background with black text |
头部与底部均为灰色背景黑色文字
按钮为灰色背景黑色文字
激活的按钮和链接为白色文本蓝色背景
input 输入框中 placeholder 属性值为浅灰色,value 值为黑色 | [尝试一下](/try/tryit.php?filename=tryjqmob_themes_a) |
| b | The page has a black background with white text
Both header and footer have a black background with white text
Buttons have white text on a charcoal background
Active buttons and links have white text on a blue background
The placeholder attribute value in the input box is light gray, and the value is white | Try it |
Button styling uses class="ui-btn"; use the "ui-btn-a|b" class to set the button to gray (default) or black:
按钮
![]() |
The "a" theme style is used for most elements, and child elements usually inherit the parent element's style. |
|---|
Themed header and footer
Example
Try it »
Themed dialog header and footer
Example
Try it »
Theme buttons
Example
Try it »
Theme icons
Example
Try it »
Themed popup
Example
Try it »
Themed buttons for header and footer
Example
Try it »
Theme navbars
Example
Try it »
Themed panel
Example
Try it »
Theme collapsible buttons and content
Example
Click me - I'm collapsible!
I'm the expanded content.
Try it »
Theme lists
Example
Try it »
Theme split buttons
Example
Try it »
Theme collapsible lists
Example
Try it »
Theme forms
Example
Try it »
