gpt4 book ai didi

html - 表格单元格中的溢出文本

转载 作者:太空宇宙 更新时间:2023-11-04 04:37:57 25 4
gpt4 key购买 nike

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

这显示在表格中,类似于:

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

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

看起来像这样:

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

它需要看起来像这样:

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

最佳答案

添加这条 CSS 规则:

td {
word-break:break-word;
}

jsFiddle example

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

关于html - 表格单元格中的溢出文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15979430/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com