Word-wrap:break-word在IE9中不工作 [英] Word-wrap: break-word not working in IE9
问题描述
我有一个从我的数据库输出的隐私字段(值为To:或Bcc :)和电子邮件地址字段。我希望电子邮件地址始终在收件人:/ Bcc:之后,并且在电子邮件地址过长时不会向下移动。
I have a privacy field (values are To: or Bcc:) and an email address field that are outputted from my database. I want the email address to always be after the To: / Bcc: and not moved a line down when the email address is too long.
按钮是position:absolute因此它不应影响文本位置。
The button is position: absolute so it shouldn't be affecting the text position.
我的数据库(到目前为止)的最长电子邮件地址长度为41个字符。
The longest email address on my database (so far) is 41 characters long.
我使用此方法在电子邮件地址到达单元格末尾时中断电子邮件地址,电子邮件地址的剩余部分在下一行继续:
I've used this method to break the email address when it reaches the end of the cell, with the remaining part of the email address continued on the next line down:
<tr>
<td>Email:</td>
<td style="word-wrap: break-word"><?php echo $Privacy; ?> <span><?php echo $Email; ?></span> <button class="copy">COPY</button></td>
</tr>
...这在IE9中不起作用。我需要至少有五个字符的隐私字段(密送:),然后36个字符之前,包装之前需要发生。
... this doesn't work in IE9. I need to have at least five characters for the privacy field (Bcc: ) and then 36 characters after that before wrapping needs to take place.
我使用CSS除了它的目的之外的东西?文本封装似乎不再受支持。
Am I using the CSS for something other than it's purpose? Text-wrap doesn't appear to be supported anymore. Is JavaScript or PHP needed to address this?
谢谢
推荐答案
在Internet Explorer以外的浏览器中—也许在IE9—它是 overflow-wrap
。
In browsers other than Internet Explorer — and maybe in IE9 — it's overflow-wrap
.
<td style="overflow-wrap: break-word">
您可以尝试这两种风格。 编辑尝试 -ms-word-wrap
for IE9。
You could try both styles. edit Try -ms-word-wrap
for IE9.
这篇关于Word-wrap:break-word在IE9中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!