<table>
<tr>
<th>Name</th>
<th>phone no</th>
<th>address</th>
</tr>
<tr>
<td>Nadia</td>
<td>012-4532564</td>
<td>no 6,ampang, selangor, malaysia</td>
</tr>
<tr>
<td>osman</td>
<td>017-25698744</td>
<td>no 20 street 3</td>
</tr>
</table>
以下是我的HTML代码,因此输出结果将会是:
name | phone no | address
------------------------------------------------------
nadia| 012-4532564 | no 6,ampang, selangor, malaysia
-----------------------------------------------------
osman| 017-25698744 | no 20 street 3
-----------------------------------------------------
我希望使用CSS来实现以下输出效果...
-----------------------------------
| nadia |
| 012-4532564 |
| no 6,ampang, selangor, malaysia |
-----------------------------------
| osman |
| 017-25698744 |
| no 20 street 3 |
-----------------------------------
如果我们使用HTML,可以使用colspan。在搜索到使用CSS的代码后,我发现了column-span,但它根本不起作用... 我坚持使用表格标记而不是div,并且只使用CSS...更像是我希望表格成为响应式模板...