我一直在做评论框,看到我的评论后我遇到了问题.我想要的只是当它超过容器时让我的评论自动断行,但我现在得到的是一条直线.
例如:
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
我希望我的文字可以是这样的:
ttttttttttttt ttttttttttttt ttttttttttttt ttttttttttttt
我应该使用什么来使我的文本自动断行?
@H_403_12@解决方法
这听起来就像你在自动换行之后:break-word,以及它的跨浏览器变体.
见:https://developer.mozilla.org/en/CSS/white-space
selector { word-wrap: break-word; /* IE 5.5-7 */ white-space: -moz-pre-wrap; /* Firefox 1.0-2.0 */ white-space: pre-wrap; /* current browsers */ }@H_403_12@ @H_403_12@ 原文链接:https://www.f2er.com/html/232286.html