jQuery Mobile教程: 网格

 时间:2026-02-16 15:24:27

1、两列布局

<div data-role="content">

   两列布局:

   <div class="ui-grid-a">

     <div class="ui-block-a"><a href="#" data-role="button">第一列按钮</a><br>

       <span>第一列:This is some text. This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-b">

       <a href="#" data-role="button">第二列按钮</a><br>

       <span>第二列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

   </div>

  </div>

jQuery Mobile教程: 网格

2、三列布局

<div data-role="content">

   三列布局:

   <div class="ui-grid-b">

     <div class="ui-block-a"><a href="#" data-role="button">第一列按钮</a><br>

       <span>第一列:This is some text. This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-b">

       <a href="#" data-role="button">第二列按钮</a><br>

       <span>第二列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-c">

       <a href="#" data-role="button">第三列按钮</a><br>

       <span>第三列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

   </div>

  </div>

jQuery Mobile教程: 网格

3、四列布局

<div data-role="content">

   四列布局:

   <div class="ui-grid-c">

     <div class="ui-block-a"><a href="#" data-role="button">第一列</a><br>

       <span>第一列:This is some text. This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-b">

       <a href="#" data-role="button">第二列</a><br>

       <span>第二列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-c">

       <a href="#" data-role="button">第三列</a><br>

       <span>第三列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-d">

       <a href="#" data-role="button">第四列</a><br>

       <span>第四列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>  

   </div>

  </div>

jQuery Mobile教程: 网格

4、五列布局

<div data-role="content">

   五列布局:

   <div class="ui-grid-d">

     <div class="ui-block-a"><a href="#" data-role="button">第一列</a><br>

       <span>第一列:This is some text. This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-b">

       <a href="#" data-role="button">第二列</a><br>

       <span>第二列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-c">

       <a href="#" data-role="button">第三列</a><br>

       <span>第三列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>

     <div class="ui-block-d">

       <a href="#" data-role="button">第四列</a><br>

       <span>第四列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>  

     <div class="ui-block-e">

       <a href="#" data-role="button">第五列</a><br>

       <span>第五列:This is some text. This is some text. This is some text. This is some text.</span>

     </div>  

   </div>

  </div>

jQuery Mobile教程: 网格

5、自定义网格

<div data-role="content">

   三列样式布局:

   <div class="ui-grid-b">

     <div class="ui-block-a"><span>第一个列</span></div>

     <div class="ui-block-b"><span>第二个列</span></div>

     <div class="ui-block-c"><span>第三个列</span></div>

   </div>

  </div>

jQuery Mobile教程: 网格

6、列中的多行

<div data-role="content">

   三列布局:

   <div class="ui-grid-b">

     <div class="ui-block-a" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-b" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-c" style="border: 1px solid black;"><span>Some Text</span></div>

   </div>

   多行的三列布局:

   <div class="ui-grid-b">

     <div class="ui-block-a" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-b" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-c" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-a" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-b" style="border: 1px solid black;"><span>Some Text</span></div>

     <div class="ui-block-a" style="border: 1px solid black;"><span>Some Text</span></div>

   </div>

  </div>

jQuery Mobile教程: 网格

  • jQuery Mobile 教程:主题
  • jQuery Mobile 教程:工具栏
  • jQuery Mobile 教程:按钮图标
  • jQuery Mobile 教程:页面切换动画
  • jQuery图片拖拽网格布局
  • 热门搜索
    梵净山在哪里 防火墙在哪里关闭 鄂f是哪里的车牌 克隆好友怎么弄 鲜柠檬怎么泡水 鱼米之乡是哪里 湖南海外旅游有限公司 坝上草原旅游 怎么注销新浪微博 b站邀请码怎么获得