JQuery Mobile

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

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

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

<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"。

原文地址:https://www.cnblogs.com/yin-yi/p/4715520.html