我有一个表格单元格一直拒绝包装它的内容(跨度)。这是根据 Chrome 开发工具的场景:
有以下<td>
规则:
overflow:visible;
white-space:normal;
有<table>
:
table-layout:fixed;
表中的第一行有两列定义了固定宽度;有问题的单元格有padding="2"
。
据我所知,应该这样做,但它不是包装内容。我尝试使用以下规则失败:
word-break: break-all;
word-wrap: break-word;
max-width: 120px; /*this is the max width I want to ensure*/
我在这里想念什么?