CSS换行

给定一个块容器
<div>
 this is a very long string which contains a bunch of characters that I want to break at container edges.
</div>

有没有任何css属性我可以设置强制它到达容器宽度时断开,不管字符串的内容,例如:

this is a ve
ry long stri
ng which ...

几乎是我想要的现在,似乎总是喜欢打破空格字符或其他特殊字符(如/).

解决方法

一个名为word-break的CSS3属性将来可能会对你有所帮助.

更多信息,请访问:http://www.css3.com/css-word-break/

break-all值看起来要做你要求的事情:

Useful where content contains a majority of Asian character set content,to which this value behaves like ‘normal’. Non-Asian character set content may be arbitrarily broken across lines.

对于更多支持的CSS版本,我不相信有一种方法可以做到这一点.

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效