Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我面临的一个非常基本的问题是,在单元格上溢出时<td>,文本会超出指定的宽度
<td>
问题如下所示:
+---------------+ | abcdef@hotmai|.com +---------------+
我希望溢出文本转到下一行。类似于以下的东西。
+---------------+ | abcdef@hotmai| | .com | +---------------+
我尝试了以下css但没有用: max-width:20%; table-layout:fixed;
max-width:20%; table-layout:fixed;
使用word-wrapCSS 属性将文本包裹在固定宽度内td
word-wrap
td
table td { word-wrap: break-word; }