我得到了一个表格单元格,我总是希望它有一个特定的宽度。但是,它不能处理大量无间距的文本字符串。这里有一个测试案例:
td {
border: solid green 1px;
width: 200px;
overflow: hidden;
}
<table>
<tbody>
<tr>
<td>
This_is_a_terrible_example_of_thinking_outside_the_box.
</td>
</tr>
</tbody>
</table>
如何让文本在框的边缘被截断,而不是让框展开?