【发布时间】:2025-12-10 12:15:02
【问题描述】:
基本上我想做它所说的:How to break long words in the text without breaking short words 带有 锚元素的文本,
使用 Internet Explorer 11,
我已经尝试了很多组合:word-break:break-all;word-break: break-word;word-wrap: break-word:
来自这个问题:
Internet Explorer 11 word wrap is not working
我知道我应该将white-space: pre-wrap 属性添加到我已经做过的代码中。不过,这对我不起作用。
这是 HTML 代码:
<div class="container">
<table class="table">
<tbody class="tBody">
<tr>
<td>
<span>
<img src="image.png">
<a href="">This is a verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrryyyyy long
text that doesnt work like I want it to. I hate IE.
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
CSS:
.container {
white-space: pre-wrap;
display: inline-table;
word-wrap: break-word;
word-break: break-all;
}
【问题讨论】:
-
你的 CSS 在哪里?
标签: html css internet-explorer-11