如何在<td>
代码内部表格上显示数据?
通过下面的代码,当加载页面时,它将显示如下图像:
http://image.free.in.th/v/2013/ir/160521040137.png
但我想在111
标记之上显示<td>
,如下图所示:
http://image.free.in.th/v/2013/io/160521040244.png
我该怎么做?我尝试了所有的东西,但它不起作用。
<table>
<tbody>
<tr>
<td style="width: 100px;-ms-word-wrap: break-word;word-wrap: break-word;-ms-word-break: break-word;word-break: break-word;word-break: break-all;padding-left: 10px;border: 1px solid #d0d0d0;text-align: center;">111</td>
<td style="width: 600px; -ms-word-wrap: break-word; word-wrap: break-word; -ms-word-break: break-word; word-break: break-word; word-break: break-all; padding-left: 10px; border: 1px solid #d0d0d0; ">
dsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdfdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdfdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdf
</td>
</tr>
<tr>
<td style="width: 100px;-ms-word-wrap: break-word;word-wrap: break-word;-ms-word-break: break-word;word-break: break-word;word-break: break-all;padding-left: 10px;border: 1px solid #d0d0d0;text-align: center;">222</td>
<td style="width: 600px; -ms-word-wrap: break-word; word-wrap: break-word; -ms-word-break: break-word; word-break: break-word; word-break: break-all; padding-left: 10px; border: 1px solid #d0d0d0; ">
dsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdhgdffdsgfdh
</td>
</tr>
</tbody>
</table>
答案 0 :(得分:1)
答案 1 :(得分:1)
您可以使用
<td style="...; vertical-align: top;">...</td>
答案 2 :(得分:1)
您可以在此处添加CSS
类
table td {
display: table-cell;
vertical-align: top;
}
这可以帮助您编写一次代码并为表的所有<TD>...</TD>
执行操作。