Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Mobile Transitions

jQuery Mobile Transitions


jQuery Mobile includes CSS3 effects that let you choose how a page opens.


jQuery Mobile page transition effects

jQuery Mobile provides various effects for transitioning to the next page.

**Note:** To achieve page transition effects, the browser must support CSS3 3D transitions:

12.0 10.0 16.0 4.0 15.0

The numbers in the table are the minimum browser versions that support 3D rotation.

Page transition effects can be applied to any link or form that uses the data-transition attribute:

Page transition effects can be applied to any link or form submission that uses the data-transition attribute:



切换到第二个页面

The following table shows the page transitions available through the use of the data-transition attribute:

Transition Description Page Dialogs
fade Default. Fade in to the next page Try it Try it
flip Flip from back to front to the next page Try it Try it
flow Throw the current page and enter the next page Try it Try it
pop Go to the next page like a popup. Try it Try it
slide Slide from right to left to the next page. Try it Try it
slidefade Slide from right to left and fade in to the next page. Try it Try it
slideup Slide from bottom to top to the next page. Try it Try it
slidedown Slide from top to bottom to the next page. Try it Try it
turn Turn to the next page. Try it Try it
none No transition effect. Try it Try it
lamp On all links in jQuery Mobile, the fade effect is used by default (if the browser supports it).

**Tip:** All the above effects support reverse behavior. For example, if you want the page to slide from left to right instead of right to left, use the data-direction attribute with the "reverse" value. This is the default on the back button.

Example

data-direction="reverse"

switch

Try it »