0

我有一长串没有空格的文件路径。例如:

这显示在 atable中,类似于:

<td>
    /thisisthetopfolder/thisisthebottomfolder/thisisthefile.html
</td>

但是,文本不会溢出到下一行,它只是在表格单元格宽度的末尾被截断/截断。我无法增加表格或表格单元格的宽度。有没有办法强制溢出表格单元格中的文本,使其不会被切断?

它看起来像这样:

------------------------------------------
| /thisisthetopfolder/thisi | other info  |
------------------------------------------

它需要看起来像这样:

------------------------------------------
| /thisisthetopfolder/thisi  |            |
|  sthebottomfolder/thisisth |            |
|  efile.html                | other info |
------------------------------------------
4

1 回答 1

2

添加此 CSS 规则:

td {
    word-break:break-word;
}

jsFiddle 示例

word-break CSS 属性用于指定如何(或是否)在单词中换行。

于 2013-04-12T19:35:09.413 回答