【问题标题】:How to split Row into multiple Columns?如何将行拆分为多个列?
【发布时间】:2015-12-10 17:14:12
【问题描述】:

html中如何将单行拆分为多列????

  | Status |            Data           |
  |  A     |             1             |
  |  B     |             2             |
  |  C     |             3             |
  |  D     |             4             |
  |            Add New Row             |
  | Daily  | Weekly | Monthly | Yearly |
  |   2    |    4   |    2    |   6    |

我怎样才能在我的表中做到这一点??

有人帮帮我吗?

【问题讨论】:

  • 添加html代码,你试过了。

标签: html asp.net


【解决方案1】:

一种可能的解决方案是为您的表格使用 colspan。 例如:

<table style="width:500px;text-align:center">
<tr style="background-color:lightgrey">
  <td>Status</td>
  <td colspan="3">Data</td>
</tr>
<tr style="background-color:lightgrey">
  <td colspan="4">Add New Row</td>
</tr>
<tr style="background-color:lightgrey">
  <td>Daily</td>
  <td>Weekly</td>
  <td>Monthly</td>
  <td>Yearly</td>
</tr>
</table>

样式标签只是为了使其可视化

希望这会有所帮助。 欲了解更多信息,请查看http://www.w3schools.com/html/html_tables.asp

干杯, 丹

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-10
    相关资源
    最近更新 更多