jQueryMobile(一)
一】、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(一)的更多相关文章
- html5+jqueryMobile编写App推广注册页
html5+jqueryMobile的组合可以直接开发web版的app,所以用到我当前app中的推广注册页的编写是很恰当的,其实只要你熟悉html4+jquery的组合开发,那么html5+jquer ...
- [deviceone开发]-do_Webview加载JQueryMobile的示例
一.简介 JQueryMobile是JQuery的移动版,不过它并没有像JQuery那么成功.我们只是使用JQueryMobile来展示do_Webview加载第三方js框架.适合所有开发者.二.效果 ...
- jQueryMobile示例页面代码
这是一个jQueryMobile示例页面 示例效果:http://hovertree.com/texiao/jquerymobile/ 可以在手机或者触屏浏览器查看效果. 以下是HTML代码: < ...
- jQueryMobile 网页在UC等游览器上无法正常显示或者是无法自适应设备大小,但在QQ游览器上能正常显示的解决方法
造成jQueryMobile网页在QQ游览器上能正常显示,在UC等游览器上无法正常显示或者是无法自适应设备大小的解决方法: 在<head>标签间添加<meta name=" ...
- jQueryMobile引入文件后样式无法正常显示
jQueryMobile引入文件后样式无法正常显示解决方法: jQuery文件必须放在jQueryMobile文件之前 eg:
- jquerymobile仿微信 - 01
jquerymobile仿微信 - 01 jquerymobile的组件感觉不咋地哇 本地调试最好是开一个web server,不然数据访问会有问题 <div data-role="p ...
- Jquerymobile 简单安装
需要导入三个文件jquery,jquerymobile,css(jquerymobile地址:http://jquerymobile.com/) <script src="js/jqu ...
- jquerymobile页面跳转和参数传递
http://blog.csdn.net/chen052210123/article/details/7481578 页面跳转: 页面跳转时pagebeforechange事件会被触发两次,通过$(d ...
- jquery-mobile之loading加载自定义
用jquery-mobile的时候,我们发现文档中loading是直接通过标签属性进行渲染,封装的函数必须通过点击按钮才能执行.而实际运用中,我们的加载开始和结束可能不需要点击,而是通过某个函数调用直 ...
- JqueryMobile入门基础附源码下载
最近要做一个手机版的网站,所以就了解了一点JqueryMObile,下面是我整理的笔记,现在分享给大家,希望朋友们喜欢,先给个首页看看吧!!! 一.JqueryMobile基本页面结构 <!DO ...
随机推荐
- P2446 [SDOI2010]大陆争霸
\(\color{#0066ff}{ 题目描述 }\) 幻想历8012年5月12日深夜,斯普林·布拉泽降下神谕:"Trust me, earn eternal life."克里斯军 ...
- Navicat12破解
Navicat12破解 http://www.sdbeta.com/xiazai/2017/0818/209765.html
- 使用Mybatis-plus发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
容我慢慢说来,之前是使用springboot+mybatis.我一直采用xml配置文件写sql. 后来采用了mybatis-plus之后,在本地上面测试没有一点问题.一放到服务器就发生这种情况 在本地 ...
- Django 07 Django模型基础2 (常用查询和多表关联)
Django 07 Django模型基础2 (常用查询和多表关联) 一.常用查询 #查找数据 def search_user(request): #获取 rs = User.objects.first ...
- Codeforce-A-Two distinct points(暴力)
output standard output You are given two segments [l1;r1][l1;r1] and [l2;r2][l2;r2] on the xx-axis. ...
- HDU计算机学院大学生程序设计竞赛(2015’12)The Magic Tower
Problem Description Like most of the RPG (role play game), “The Magic Tower” is a game about how a w ...
- Flask&&人工智能AI -- 8 HTML5+ 初识,HBuilder,夜神模拟器,Webview
昨日内容回顾 1.增删改查: 增: db.collections.insert({a:1}) // 官方不推荐了 db.collections.insertMany([{a:1},{b:1}]) in ...
- Spring Cloud 监控相关
因为最近客户提出想监控Spring Cloud运行状况的需求,所以稍稍做了调研.目前了解的方法如下: Eureka Server启动后可以在根目录路径看到所有注册的Eureka Client状况 各个 ...
- 在U盘打造个性化PE工具箱+KALI(Persistence)+存储的工作站
基本工具: kali-linux-2018.2-amd64 原版镜像:https://www.kali.org/downloadsWin32DiskImager yunfile 下载较慢,建议自行百度 ...
- python3 unittest数据驱动
我们在自动化测试的时候,有没有遇到这样的问题?例如一个登录的接口要做自动化,会有很多case(用例),密码错误,密码正确这种.在继承unittest.TestCase的类中,凡是以“test”开头的方 ...