gpt4 book ai didi

css - word-break :break-all styling in firefox?的解决方案

转载 作者:技术小花猫 更新时间:2023-10-29 11:15:03 26 4
gpt4 key购买 nike

我正在尝试将文本包装在 td 中并使用以下样式

word-break:break-all

在 IE 中工作得很好,但在 Firefox 中失败,请注意这是不支持的!尝试了 http://petesbloggerama.blogspot.com/2007/02/firefox-ie-word-wrap-word-break-tables.html 中给出的解决方案.似乎也没有用,对此有任何解决方案吗?

谢谢,阿达什

最佳答案

我终于也遇到了一些麻烦。但我设法让它工作:

.hardBreak {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+, 6, 7, 8 compability-mode */
-ms-word-break: break-all; /* Internet Explorer 8 */
}

希望对您有所帮助。

拥有 IE8 native 模式时需要最后一个选项。这对我有用,并在 FF8、IE 7、8compability、8native、Chrome 中进行了测试。

关于css - word-break :break-all styling in firefox?的解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8590767/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com