jQuery Mobile C...login
jQuery Mobile Classic Tutorial
author:php.cn  update time:2022-04-11 13:58:34

jQuery Mobile CSS 类


jQuery Mobile CSS Class


jQuery CSS Class

jQuery Mobile CSS class to style different elements.

The following list contains common CSS styles:


Global classes

The following classes can be used in jQuery Mobile gadgets (buttons, toolbars, panels, Tables, lists, etc. ):

#ClassDescription##ui-corner-allui-shadow##ui-overlay-shadow Add multiple layers of shadows to elementsui-miniMake elements smaller
Add rounded corners to elements
Add shadow to elements
Button Class

In addition to the global class, you can specify <a> or Add the following class to the <button> element (not the <input> button):

ClassDescriptionui-btnAdded on the <a> element and displayed as a buttonui-btn-inlineon the same line Show button on topui-btn-icon-topPosition icon above button textui-btn -icon-rightPosition the icon to the right of the button textui-btn-icon-bottomPosition the icon below the button textui-btn-icon-left Position the icon to the left of the button textui-btn-icon-notext Only display the iconui-btn-a|bSpecify button demonstration. "a" is the default (black text style with gray background), "b" changes the color to white text with black background

Icon Classes

All available image classes are used on the <a> and <button> elements (see the jQuery Mobile Icon Reference Manual to learn how to use them on other elements) :

##ui-icon-alertExclamation mark within the triangleui-icon-audioAudio/Speakerui-icon-arrow-d-lLower left corner arrow##ui-icon-arrow-d-r##ui-icon-arrow-u-lUpper left arrowui-icon-arrow-u-rupper right corner arrowui-icon-arrow-lLeft corner arrowRight corner arrowUp arrowDown ArrowReturnThree horizontal lines, generally used to display list button icons ##ui-icon-calendarCalendar##ui-icon-cameraui-icon-carat-dui-icon -carat-l##ui-icon-carat-rright Sliding iconui-icon-carat-uSliding icon upui-icon-checkCheckAlarm clock云Comment/MessageDelete##ui-icon-editui-icon-eyeui-icon- forbidden##ui-icon-gear Gear, generally used to set button iconsui-icon-gridGridui-icon-heartHeart shape, can be used for article collection##ui-icon-home##ui-icon-infoInformationLocationLOCKMail/Envelope##ui-icon-minusui-icon-navigation##ui-icon-powerSwitch (On/off)ui-icon-plusplus signui-icon -recyclecycle Identification##ui-icon-search Search/Magnifying Glass##ui-icon-shopui-icon-star##ui-icon-tagtaguser/characterVideo/Camera##Theme Classes
ClassIcon DescriptionIcon
ui-icon-actionAction (generally used for page jump switching)action
alert
audio
arrow-d-l
Lower right arrowarrow-d-r
arrow-u-l
arrow-u-r
arrow-l##ui-icon-arrow-r
##ui-icon-arrow-uarrow-r
ui-icon-arrow-darrow-u
ui-icon- backarrow-d
ui-icon-barsback
ui-icon-bulletsUsed to display list button iconsbullets
calendar
Cameracamera
Swipe down the iconcarat-d
Slide icon leftcarat-l
carat-r
carat-u
check##ui-icon-clock
##ui-icon-cloudclock
ui-icon-commentcloud
ui-icon-delete comment
deleteEdit/Pencil
editeye
eyeforbidden sign
ui-icon-forwardUndo- (return to previous step)forward
gear
grid
heart
首页home
info##ui-icon-location
locationui-icon-lock
##ui-icon-maillock
mailMinus
minusNavigation
##ui-icon-phone Phonenavigation
phone
power
plus
ui-icon-refreshRefreshrefresh
search
Shop/Shopping Bagshop
star
tag##ui-icon-user
userui-icon-video
camera1
jQuery Mobile provides two theme classes: a (gray) and b (black). However, you can create your own custom class - up to the letter "z" (see jQuery Mobile themes). The following table lists the available theme classes. The letters (a-z) mean that the style can be specified a through z. For example ui-bar-a or ui-bar-b etc.

Class

Descriptionui-bar-(a-z)Specified column Demo - Header, bottom and other columns ui-body-(a-z)Specify the color of the content block - page content part ( Version 1.4.0 is obsolete), list view, pop-up window, sidebar, panel, loading, collapse. ui-btn-(a-z)Specify button colorui-group-theme-(a-z)Defines the demo listviews and collapsible collections of the control group. ui-overlay-(a-z) Defines the page background color, including dialog boxes, pop-ups and other page containers that appear on the top levelui-page-theme-(a-z)Defines the page demo

Grid Class

Columns in a grid are equal width (totaling to 100%), with no borders, backgrounds, margins or padding. There are four layout grids available:

Grid ClassColumnsColumn Width Corresponds to Instance
ui-grid-solo1100%ui-block- aTry it
ui-grid-a250% / 50%ui- block-a|bTry it
ui-grid-b333% / 33% / 33%ui-block-a|b|c Try it
ui-grid-c425% / 25% / 25% / 25%ui-block-a|b|c|dTry it
ui- grid-d520% / 20% / 20% / 20% / 20%ui-block-a|b|c|d|e Try it out

#For more information, see the jQuery Mobile Grid chapter.

php.cn