CSS:在锚元素中打断长词而不打断小词 Internet Explorer 11
CSS: break long words without breaking small words Internet Explorer 11 in anchor element
基本上我想按照此处所说的进行操作: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 文件中:
table,td,th, td *, td a, td img {
word-wrap: break-word;
word-break: break-all;
}
table {
width:100%;
table-layout:fixed;
}
基本上我想按照此处所说的进行操作: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 文件中:
table,td,th, td *, td a, td img {
word-wrap: break-word;
word-break: break-all;
}
table {
width:100%;
table-layout:fixed;
}