繁体   English   中英

jQuery Mobile用户界面响应表添加了额外的标题

[英]jQuery Mobile ui-responsive table adding extra header

使用jQuery Mobile-以及表的新ui响应类-如果视口变得太窄,则该表应折叠为单列。

但是,当我拖动浏览器以缩小视口时,它将采用第一列标题,并将其添加到表格页脚中:

视口足够宽:

之前

狭窄的视口:

后

我的HTML标记是:

        <table data-role="table" class="ui-responsive">
        <thead>
            <tr class="ui-bar-b">
                <th>Column Header 1</th>
                <th>Column Header 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <select></select>
                </td>
                <td>
                    <select></select>
                </td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="2" style="text-align:center;">
                    <button data-icon="plus">Add</button>
                </td>
            </tr>
        </tfoot>
    </table>

我在这里向jsFiddle添加了一个演示: http : //jsfiddle.net/mtait/44k3E/2/

这只是Mobile CSS中的错误-还是已知的,是否可以解决?

谢谢,

标记

它没有添加额外的标题。 这就是它的工作方式。 宽度减小时,它将标题放在每列值的上方。

为了更好地理解,请参考更新的小提琴链接。 DEMO

    <table data-role="table" class="ui-responsive">
        <thead>
            <tr class="ui-bar-b">
                <th>Column Header 1</th>
                <th>Column Header 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <select></select>
                </td>
                <td>
                    <select></select>
                </td>
            </tr>
            <tr>
                <td>
                    <select></select>
                </td>
                <td>
                    <select></select>
                </td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td>
                    <button data-icon="plus">Add</button>
                </td>
                 <td>
                    <button data-icon="plus">Add</button>
                </td>
            </tr>
        </tfoot>
    </table>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM