JQuery Mobile

构建于 jQuery 库之上,是一个为触控优化的框架,用于建立移动 web 应用程序。适用于全部流行的智能手机和平板电脑。css

优势:它会自动为网页设计交互的易用外观,并在全部移动设计上保持一致。jquery

要使用 jQuery Mobile,首先须要在开发的界面中包含以下3个内容:web

<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>

基本结构:浏览器

<body>
<div data-role="page">----(data-role="page" 是显示在浏览器中的页面)

  <div data-role="header">----(data-role="header" 建立页面上方的工具栏(经常使用于标题和搜索按钮)) 
    <h1>欢迎访问个人主页</h1>
  </div>

  <div data-role="content">---- (data-role="content" 定义页面的内容,好比文本、图像、表单和按钮,等等 )
    <p>我是一名移动开发者!</p>
  </div>

  <div data-role="footer">----(data-role="footer" 建立页面底部的工具栏 )
    <h1>页脚文本</h1>
  </div>

</div>
</body>
PS:  在头部和底部添加data-position=”fixed” 属性,能够使头部保持屏幕的顶部,底部部分在页面的底部。

对话框是用来显示信息或请求输入的视窗类型。框架

如需在用户点击(轻触)连接时建立一个对话框,请向该连接添加 data-rel="dialog"。工具

相关文章
相关标签/搜索