我的自动换行根本没有用
<table border="1" style="width:100%">
<thead>
<tr>
<th>very long word</th>
</tr>
</thead>
<tbody>
<tr>
<td style="word-wrap:break-word;">ablkasd/123123123/agsdfasdf/asdfasdfasdf/_sdfsdfsdf{123123-14werwwer-14124124-wefweshtsdf-235232323}/3235235/dasasdfasdfasdf.bsfs</td>
</tr>
</tbody>
</table>
字符串没有中断,并且始终在一行中。
我已经尝试了Word Wrap的所有解决方案,但均无法正常工作,但仍无法正常工作
您将需要添加table-layout: fixed;
到表中:
table {width:100%; table-layout: fixed;}
table td {word-wrap:break-word;}
<table>
<thead>
<tr>
<th>very long word</th>
</tr>
</thead>
<tbody>
<tr>
<td>ablkasd/123123123/agsdfasdf/asdfasdfasdf/_sdfsdfsdf{123123-14werwwer-14124124-wefweshtsdf-235232323}/3235235/dasasdfasdfasdf.bsfs</td>
</tr>
</tbody>
</table>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句