一】、jQuery Mobile 页面

 <!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<!--移动端最基本配置-->
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<title></title>
<!--引入jQuery Mobile样式结构-->
<link rel="stylesheet" href="jquery_mobile/jquery.mobile-1.4.5.min.css"/>
</head>
<body> <!--定义一个jQueryMobile页面-->
<div data-role="page">
<!--定义jQueryMobile头部-->
<div data-role="header">
<h1>欢迎来到我的主页</h1>
</div>
<!--定义jQueryMobile主体-->
<div data-role="main">
<p>我现在是一个移动端开发者!</p>
</div>
<!--定义jQueryMobile底部-->
<div data-role="footer">
<h1>底部文本</h1>
</div>
</div> <!--引入jQuery-->
<script src="jquery/jquery-1.12.1.min.js"></script>
<!--引入jQuery.Mobile.js-->
<script src="jquery_mobile/jquery.mobile-1.4.5.min.js"></script>
<script src="script.js"></script> </body>
</html>

 

多个页面以及对话框的跳转:

 <!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<!--移动端最基本配置-->
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<title></title>
<!--引入jQuery Mobile样式结构-->
<link rel="stylesheet" href="jquery_mobile/jquery.mobile-1.4.5.min.css"/>
</head>
<body> <!--定义一个jQueryMobile页面-->
<div data-role="page" id="page1">
<!--定义jQueryMobile头部-->
<div data-role="header">
<h1>欢迎来到我的主页</h1>
</div>
<!--定义jQueryMobile主体-->
<div data-role="main">
<p>我现在是一个移动端开发者!</p>
<a href="#page2">点击跳转到第二个页面</a>
<a href="#page3">弹出对话框</a>
</div>
<!--定义jQueryMobile底部-->
<div data-role="footer">
<h1>底部文本</h1>
</div>
</div> <!--定义第二个页面-->
<div data-role="page" id="page2">
<!--定义jQueryMobile头部-->
<div data-role="header">
<h1>我是第二个页面</h1>
</div>
<!--定义jQueryMobile主体-->
<div data-role="main">
<p>我现在是一个移动端开发者!</p>
<a href="#page1">跳回第一个页面</a>
</div>
<!--定义jQueryMobile底部-->
<div data-role="footer">
<h1>底部文本</h1>
</div>
</div> <!--定义第三个页面,是一个对话框data-dialog="true" -->
<div data-role="page" data-dialog="true" id="page3">
<!--定义jQueryMobile头部-->
<div data-role="header">
<h1>我是第二个页面</h1>
</div>
<!--定义jQueryMobile主体-->
<div data-role="main">
<p>我现在是一个移动端开发者!</p>
<a href="#page1">跳回第一个页面</a>
</div>
<!--定义jQueryMobile底部-->
<div data-role="footer">
<h1>底部文本</h1>
</div>
</div> <!--引入jQuery-->
<script src="jquery/jquery-1.12.1.min.js"></script>
<!--引入jQuery.Mobile.js-->
<script src="jquery_mobile/jquery.mobile-1.4.5.min.js"></script>
<script src="script.js"></script> </body>
</html>

二】、jQuery Mobile 页面切换

比较友好化的几个效果:
1.淡入 data-transition='fade'
2.弹出 data-transition='pop'
3.滑动 data-transition='slide' (不太好)
4.从右到左滑动并淡入 data-transition='slidefade'
5.从上到下滑动 data-transition='slidedown'
6.颠倒返回效果 data-transition="slidedown" data-direction="reverse"
7.没有切换效果 data-transition='none'
从后向前翻转(中心点是y轴)data-transition='flip'

 <!-- 定义翻页效果,默认是淡入淡出,data-transition -->
<!--定义一个jQueryMobile页面-->
<div data-role="page" id="page1">
<!--定义jQueryMobile头部-->
<div data-role="header">
<h1>欢迎来到我的主页</h1>
</div>
<!--定义jQueryMobile主体-->
<!--.ui-content设置默认边距-->
<div data-role="main" class="ui-content">
<p>我现在是一个移动端开发者!</p>
<a href="#page2" data-transition="flip">点击跳转到第二个页面</a>
</div>
<!--定义jQueryMobile底部-->
<div data-role="footer">
<h1>底部文本</h1>
</div>
</div> <!--定义第二个页面-->
<div data-role="page" id="page2">
<!--定义jQueryMobile头部-->
<div data-role="header">
<h1>我是第二个页面</h1>
</div>
<!--定义jQueryMobile主体-->
<div data-role="main" class="ui-content">
<p>我现在是一个移动端开发者!</p>
<a href="#page1" data-transition="none">跳回第一个页面</a>
</div>
<!--定义jQueryMobile底部-->
<div data-role="footer">
<h1>底部文本</h1>
</div>
</div>

jQueryMobile(一)的更多相关文章

  1. html5+jqueryMobile编写App推广注册页

    html5+jqueryMobile的组合可以直接开发web版的app,所以用到我当前app中的推广注册页的编写是很恰当的,其实只要你熟悉html4+jquery的组合开发,那么html5+jquer ...

  2. [deviceone开发]-do_Webview加载JQueryMobile的示例

    一.简介 JQueryMobile是JQuery的移动版,不过它并没有像JQuery那么成功.我们只是使用JQueryMobile来展示do_Webview加载第三方js框架.适合所有开发者.二.效果 ...

  3. jQueryMobile示例页面代码

    这是一个jQueryMobile示例页面 示例效果:http://hovertree.com/texiao/jquerymobile/ 可以在手机或者触屏浏览器查看效果. 以下是HTML代码: < ...

  4. jQueryMobile 网页在UC等游览器上无法正常显示或者是无法自适应设备大小,但在QQ游览器上能正常显示的解决方法

    造成jQueryMobile网页在QQ游览器上能正常显示,在UC等游览器上无法正常显示或者是无法自适应设备大小的解决方法: 在<head>标签间添加<meta name=" ...

  5. jQueryMobile引入文件后样式无法正常显示

    jQueryMobile引入文件后样式无法正常显示解决方法: jQuery文件必须放在jQueryMobile文件之前 eg:

  6. jquerymobile仿微信 - 01

    jquerymobile仿微信 - 01 jquerymobile的组件感觉不咋地哇 本地调试最好是开一个web server,不然数据访问会有问题 <div data-role="p ...

  7. Jquerymobile 简单安装

    需要导入三个文件jquery,jquerymobile,css(jquerymobile地址:http://jquerymobile.com/) <script src="js/jqu ...

  8. jquerymobile页面跳转和参数传递

    http://blog.csdn.net/chen052210123/article/details/7481578 页面跳转: 页面跳转时pagebeforechange事件会被触发两次,通过$(d ...

  9. jquery-mobile之loading加载自定义

    用jquery-mobile的时候,我们发现文档中loading是直接通过标签属性进行渲染,封装的函数必须通过点击按钮才能执行.而实际运用中,我们的加载开始和结束可能不需要点击,而是通过某个函数调用直 ...

  10. JqueryMobile入门基础附源码下载

    最近要做一个手机版的网站,所以就了解了一点JqueryMObile,下面是我整理的笔记,现在分享给大家,希望朋友们喜欢,先给个首页看看吧!!! 一.JqueryMobile基本页面结构 <!DO ...

随机推荐

  1. ReentranLock实现原理

    原文链接:https://blog.csdn.net/jeffleo/article/details/56677425 一.ReentranLock 相信我们都使用过ReentranLock,Reen ...

  2. P4724 【模板】三维凸包

    \(\color{#0066ff}{题目描述}\) 给出空间中n个点,求凸包表面积. \(\color{#0066ff}{输入格式}\) 第一行一个整数n,表示点数. 接下来n行,每行三个实数x,y, ...

  3. JS的类型转换

    首先我们要知道,在 JS 中类型转换只有三种情况,分别是: 转换为布尔值 转换为数字 转换为字符串 我们先来看一个类型转换表格 转Boolean 在条件判断时,除了 undefined, null,  ...

  4. BA 的职责

    Responsibility: 确定系统应用范围:获取实际业务情况(但是并不包含与用户完善实际业务的过程),与用户一起分析实际业务中需要通过软件应用来完成的部分: 备注:是否要与用户一同来分析软件应用 ...

  5. maven mirrorOf

    转载 http://blog.csdn.net/isea533/article/details/21560089 在maven中配置一个mirror时,mirror通常会设置成*,还有可能是一个具体的 ...

  6. android:id 中区别。。

    一. android:id="@android:id/tabhost"   是调用系统内部的ID 和代码中 mTabContent = (FrameLayout) findView ...

  7. rent bike问题(二分+贪心)

    题目描述: A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to ...

  8. Linux系统结构及常用命令

    一.系统结构 Linux是一个倒树形结构,最大的目录名叫“/”(根目录) 根目录之下有许多的二级目录,这些目录在系统中都拥有自己不同的功能,如图: 以后的诸多命令的执行和操作都与这些目录相关,现在了解 ...

  9. java——线段树 SegmentTree

    应用: 区间染色 区间查询 线段树不是完全二叉树,线段树是平衡二叉树 使用数组来实现线段树:存储空间为4n 以下是使用数组实现的静态线段树: public class SegmentTree<E ...

  10. Google Zxing 生成二维码

    Net Zxing 源码地址 http://zxingnet.codeplex.com/ github 地址 https://github.com/zxing/zxing 新建一个Winform 项目 ...