使用jQuery mobile创建Nx1网格

时间:2011-10-15 11:36:25

标签: jquery grid jquery-mobile

http://jquerymobile.com/demos/1.0rc1/docs/content/content-grids.html解释了如何创建2x1,3x1,4x1和5x1网格。

但是,我需要创建一个15x15网格(每个列都会有一个图标)。

如何使用jQuery mobile实现这一目标?

1 个答案:

答案 0 :(得分:1)

您可以使用表格布局

相关:

示例:

你需要使用图标和CSS的大小来获得你想要的东西

HTML

<div data-role="page" class="type-home">
    <div data-role="content">

        <table summary="This table lists all the JetBlue flights.">
            <caption>15 x 15</caption>
            <thead>
                <tr>
                    <th scope="col">Icon 1</th>  
                    <th scope="col">Icon 2</th>
                    <th scope="col">Icon 3</th>
                    <th scope="col">Icon 4</th>
                    <th scope="col">Icon 5</th>
                    <th scope="col">Icon 6</th>
                    <th scope="col">Icon 7</th>
                    <th scope="col">Icon 8</th>
                    <th scope="col">Icon 9</th>
                    <th scope="col">Icon 10</th>
                    <th scope="col">Icon 11</th>
                    <th scope="col">Icon 12</th>
                    <th scope="col">Icon 13</th>
                    <th scope="col">Icon 14</th>
                    <th scope="col">Icon 15</th>  
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <td colspan="5">Total: 15 Icons</td>
                </tr>
            </tfoot>
            <tbody>
                <tr>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                    <td><img src='http://sandbox.yoyogames.com/extras/user/image/san1/977/138977/thumb/man.png?1283087523' /></td>
                </tr>


            </tbody>
        </table>

    </div>
</div>