jQuery Mobile 教程:工具栏

 时间:2026-02-16 10:42:01

1、创建页眉和页脚

<div data-role="page">

  <div data-role="header">

    <h1>我的页眉</h1>

  </div>

  <div data-role="content">

    此处是内容...

  </div>

  <div data-role="footer">

    <h1>我的页脚</h1>

  </div>

</div> 

jQuery Mobile 教程:工具栏

2、在页眉中添加按钮

<div data-role="header">

    <a href="#" data-role="button" data-icon="home">首页</a>

    <h1>欢迎访问我的主页</h1>

    <a href="#" data-role="button" data-icon="search">搜索</a>

  </div>

jQuery Mobile 教程:工具栏

3、在页眉中向左侧添加按钮

<div data-role="header">

  <a href="#" data-role="button">首页</a>

  <h1>欢迎访问我的主页</h1>

</div>

jQuery Mobile 教程:工具栏

4、在页眉中向右侧添加按钮

<div data-role="header">

    <h1>欢迎访问我的主页</h1>

    <a href="#" data-role="button" class="ui-btn-right" data-icon="search">搜索</a>

  </div>

jQuery Mobile 教程:工具栏

5、带有按钮的页脚

<div data-role="footer">

    <a href="#" data-role="button" data-icon="plus">转播到新浪微博</a>

    <a href="#" data-role="button" data-icon="plus">转播到腾讯微博</a>

    <a href="#" data-role="button" data-icon="plus">转播到QQ空间</a>

  </div>

jQuery Mobile 教程:工具栏

6、带有居中对齐按钮的页脚

 <div data-role="footer" class="ui-btn">

    <a href="#" data-role="button" data-icon="plus">转播到新浪微博</a>

    <a href="#" data-role="button" data-icon="plus">转播到腾讯微博</a>

    <a href="#" data-role="button" data-icon="plus">转播到QQ空间</a>

  </div>

jQuery Mobile 教程:工具栏

7、带有水平分组按钮的页脚

 <div data-role="footer" class="ui-btn">

    <div data-role="controlgroup" data-type="horizontal">

      <a href="#" data-role="button" data-icon="plus">转播到新浪微博</a>

      <a href="#" data-role="button" data-icon="plus">转播到腾讯微博</a>

      <a href="#" data-role="button" data-icon="plus">转播到QQ空间</a>

    </div>

  </div>

jQuery Mobile 教程:工具栏

  • jQuery Mobile 教程:按钮
  • jQuery Mobile 教程:主题
  • jQuery Mobile全攻略
  • jQuery Mobile 教程:页面切换动画
  • jquery跳转页面的方法
  • 热门搜索
    鼠标垫怎么洗 山东职业学院怎么样 dnf徽章怎么镶嵌 子宫肌瘤怎么办 康熙怎么死的 微信怎么设置透明主题 简历实践经历怎么写 心脏扩大是怎么回事 浙江师范大学怎么样 宫外孕是怎么回事