jquery mobile 移动web
轻量级框架jQuery Mobile
所需文件
<link rel="stylesheet" href="jquery.mobile-1.1.2/jquery.mobile-1.1.2.css"/>
<script type="text/javascript"
src="jquery.mobile-1.1.2/jquery-1.6.4.js"></script> jquery
应放在 mobile 上面。
<script type="text/javascript" src="jquery.mobile-1.1.2/jquery.mobile-1.1.2.js"></script>
dataset自定义属性,要求前缀必须带有“data-”字符,“data-”后面允许使用任何值,它允许开发人员将这类属性添加到HTML标签中,
充当元素的私有数据存储区域,不允许元素的原有功能,也不会影响布局。
jQuery Mobile 使用的自定义属性。
1.data-role
定义元素在页面中的功能角色,该属性允许定义不同的组件,元素及页面视图。
2.data-title
定义jQueru Mobile 视图页面的标题。
3.data-transition
定义视图切换的动画效果。
4.data-rel
定义具有浮动层效果的视图。
5.data-theme
指定元素或组件内的主体样式风格。
6.data-icon
在元素内增加一个icon 小图标。
7.data-iconpos
定义icon小图标的位置。
8.data-inline
指定按钮根据内容自适应其长度。
9.data-type
定义分组按钮按水平或垂直方向排列。
10.data-rel
定义具有特定功能的元素属性, 例如返回按钮 data-rel="back".
11.data-add-back-btn
指定视图页面自动在页眉左侧添加返回按钮。
12.data-back-btn-text
指定由试图页面自动创建的返回按钮的文本内容。
13.data-position
该属性的作用是实现在滑动屏幕时工具栏的显示或隐藏状态。
14.data-fullscreen
用于自定全屏视图页面。
15.data-native-menu
指定下拉选择功能采用平台内置的选择器。
16.data-placeholder
设置下拉选择功能的占位符。
17.data-inset
实现内嵌列表的功能。
18.data-split-icon
设置列表右侧的图标。
19.data-split-theme
设置列表右侧图片的主题样式风格。
20.data-filter
开启列表过滤搜索功能。
简单配置一个页面
<section data-role="page">
<header data-role="header">页头</header>
<article data-role="content">内容</article>
<footer data-role="footer">页脚</footer>
</section>
改变页面标题的视图
data-title="标题"
视觉切换动画。
data-transition="slide" slide 左右切换 slideup 从下到上 slidedown
从上到下 pop 以弹出的 fade 渐变褪色 flip 翻转飞出。
<section data-role="page" id="firstView">
<header data-role="header">第1个视图</header>
<article data-role="content"><a href="#secondView"
data-transition="flip">切换第2个视图</a></article>
<footer data-role="footer">页脚</footer>
</section>
<section data-role="page" id="secondView">
<header data-role="header">第2个视图</header>
<article data-role="content"><a href="#firstView"
data-transition="flip">切换第1个视图</a></article>
<footer data-role="footer">页脚</footer>
</section>
页面主题:data-theme = "a"
jquery mobile 移动web的更多相关文章
- JQuery Mobile移动Web应用开发(1): UI开发工具RID介绍
工欲善其事,必先利其器. UI工具可以提高我们开发界面的效率,下面对几款工具做个对比: 1. Codiqa,在JQuery Mobile主页能看到这款工具,看到网上这么多人吹捧这个工具,不过是收费的. ...
- 利用JQuery Mobile开发web app
什么是web app web app 是基于web的应用程序,是针对移动设备优化后的web站点,它具有 开发成本低——采用web开发技术,不需要考虑跨平台以及底层适配问题: 升级简单——不需要通知用户 ...
- jQuery Mobile 移动 web 应用程序框架
在这里我们主要讲一下如何引用jQuery Mobile(引用了jQuery Mobile,你就能引用jQuery Mobile里已经封装好的代码,让开发更加快捷简单) 从 CDN 引用 jQuery ...
- jquery mobile 移动web(6)
jquery mobile 针对移动端设备的事件类型. 1.touch 事件. tap 快速触摸屏幕并且离开,类似一种完整的点击操作. taphold 触摸屏幕并保持一段时间. swipe 在1秒内水 ...
- jquery mobile 移动web(5)
有序列表 <div data-role="content"> <ol data-role="listview" data-theme=&quo ...
- jquery mobile 移动web(2)
button 按钮 data-role="button" 将超链接变成button. 具有icon 图标的button 组件. 提供了18常用的图标 data-icon =&quo ...
- jquery mobile 移动web(1)
轻量级框架jQuery Mobile 所需文件 <link rel="stylesheet" href="jquery.mobile-1.1.2/jquery.mo ...
- jquery mobile 移动web(4)
下拉菜单: 设置label 元素的for 属性为 select label 元素的文本内容作为选项的名称 定义div元素并设置data-role 属性值为 fieldcontain. <div ...
- jquery mobile 移动web(3)
可折叠功能块. div 元素的 data-role 属性设置为 collapsible 代码如下: <div data-role="collapsible"> < ...
随机推荐
- NOIP2008 双栈队列
1. 双栈排序 (twostack.pas/c/cpp) Tom 最近在研究一个有趣的排序问题.如图所示,通过 2 个栈 S1 和 S2,Tom 希望借助 以下 4 种操作实现将输入序列升序 ...
- 【原创】lua编译时发现缺少readline库
编译lualua项目,其中用到了lua-5.1版本的源码,编译时提示缺少readline库,找不到readline/readline.h头文件等 发现系统中其实有安装readline库不过没有做链接和 ...
- Spring MVC整合logback日志框架实战
1.引入依赖,本项目maven构建,普通项目导入想要的jar包即可 版本 <properties> <slf4j-api.version>1.7.7</slf4j-api ...
- ubuntu 的 apt-get update 出现404错误时,ubuntu 版本也 end of life 了的解决方案
xmodulo.com/how-to-fix-apt-get-update-error-on-ubuntu.html 如果是依赖没找到,可以用 sudo apt-get install -f 先补齐依 ...
- HDU 5710 Digit-Sum (构造)
题意: 定义S(N) 为数字N每个位上数字的和.在给两个数a,b,求最小的正整数n,使得 a×S(n)=b×S(2n). 官方题解: 这道题目的结果可能非常大,所以我们直接枚举n是要GG的. 首先可以 ...
- A Tour of Go Errors
An error is anything that can describe itself as an error string. The idea is captured by the predef ...
- 谷歌下设置滚动条的css样式
.oLi-lists-scroll::-webkit-scrollbar { width:5px; padding:1px; background:url(../images/repeat-bar. ...
- PHP+MySQL开发技术详解—学习笔记
1. PHP is Hypertext Preproocessor. 2. Hello World: <?php Echo ‘Hello World!’; ?> 3. ...
- int、bigint、smallint 和 tinyint
Transact-SQL 参考 int.bigint.smallint 和 tinyint 使用整数数据的精确数字数据类型. bigint 从 -2^63 (-9223372036854775808) ...
- BZOJ 1934: [Shoi2007]Vote 善意的投票 最小割
1934: [Shoi2007]Vote 善意的投票 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnl ...