【问题标题】:How can I create these type of tables in html [duplicate]如何在 html 中创建这些类型的表 [重复]
【发布时间】:2018-02-21 17:34:23
【问题描述】:

如何在 html 中创建这些类型的表格?绿色的是主标题,有一些主标题有子标题。 我尝试了很多解决方案,但我无法弄清楚它是如何工作的。

【问题讨论】:

  • 需要使用rowspan和colspan
  • 到目前为止,您尝试了哪些方法来在 html 中创建这样的表格?

标签: html css tabular


【解决方案1】:

这是使用 rowspan 和 colspan 的示例。

<table border="1" cellspacing="0">
    <thead>
        <tr>
            <th rowspan="2">header</th>
            <th rowspan="2">header</th>
            <th colspan="4">header</th>
            <th rowspan="2">header</th>
        </tr>
        <tr>
            <th>subheader</th>
            <th>subheader</th>
        
        </tr>
    </thead>

更多信息请参考this

【讨论】:

    猜你喜欢
    • 2012-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多