相关疑难解决方法(0)

多个thead/tbody设计

我对可用性/设计有疑问.我目前正在使用一些JQuery隐藏/显示整个区域.目前这些都在一个大表中,最顶层的thead作为主标题,然后是第二个thead,它是将要显示的标题.接下来是另一个thead,它是隐藏在tbody中的任何隐藏的标题.我知道这是一种可怕的风格,但我想要解决的问题是我希望所有行都相同,因为它们都显示相同类型的数据.

代码示例是

<table id="report">
    <thead>
    <tr id="header">
        <th>Country</th>
        <th>Population</th>
        <th>Area</th>
        <th>Official languages</th>
        <th></th>
    </tr>
    </thead>

    <thead>
    <tr>
        <td>United States of America</td>
        <td>306,939,000</td>
        <td>9,826,630 km2</td>
        <td>English</td>
        <td><div class="arrow"></div></td>
    </tr>
    </thead>

    <thead>
        <tr>
            <td>First Row</td>
            <td>Second Row</td>
            <td>Third Row</td>
            <td>Fourth Row</td>
            <td>Fifth Row</td>
        </tr>
    </thead>
    <tbody>
    <tr>
        <td colspan="5">
            <img src="../125px-Flag_of_the_United_States.svg.png" alt="Flag of USA" />
            <h4>Additional information</h4>
            <ul>
                <li><a href="http://en.wikipedia.org/wiki/Usa">USA on Wikipedia</a></li>
                <li><a href="http://nationalatlas.gov/">National Atlas of the United States</a></li>
                <li><a href="http://www.nationalcenter.org/HistoricalDocuments.html">Historical Documents</a></li>
             </ul>   
        </td>
    </tr>
            <tr><td>some other stuff</td></tr>
    </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

以下是将要显示的内容: alt …

html jquery

13
推荐指数
1
解决办法
2万
查看次数

标签 统计

html ×1

jquery ×1