Firefox is different from Chrome in implementing the word-wrap, but we can use one Class to make these two browsers compatible, as following:
.word_wrap{
//make Chrome word wrap
word-wrap: break-word;
// FF
white-space: pre-wrap;
}
.word_wrap{
//make Chrome word wrap
word-wrap: break-word;
// FF
white-space: pre-wrap;
}

本文介绍了一种使Firefox和Chrome浏览器在实现word-wrap功能时保持兼容性的方法。通过使用特定的CSS样式,可以确保文字在不同浏览器中正确换行。

511

被折叠的 条评论
为什么被折叠?



