是否可以将 textarea的内容与表格的标题对齐?我试过
,但这对响应式设计有什么好处,有什么建议吗?
<tbody>
<tr>
<th>Date</th>
<th>Number</th>
<th>Line</th>
</tr>
<tr>
<td colspan="3" align="center">
<textarea id="log" wrap="hard" readonly="1" style="width:100%; height:100px; resize: none;">
Jan 1 00:00:31 111 line 5
Jan 1 00:00:45 111 line 10
Jan 1 00:00:08 222 line 2
Jan 1 00:00:31 333 line 111
Jan 1 00:00:45 333 line 20
</textarea>
</td>
</tr>
</tbody>
答案 0 :(得分:0)
根本不使用textarea会更容易:
<html>
<body>
<table>
<tr>
<th>Date</th>
<th>Number</th>
<th>Line</th>
</tr>
<tr>
<td> Jan 1 00:00:31 </td>
<td> 111 </td>
<td> line 5 </td>
</tr>
</table>
</body>
</html>