那夜我还很年幼~
我不去想身后会不会袭来寒风冷雨 既然目标是地平线 留给世界的只能是背影

首先需要启动这一句

word-wrap:break-word;

表示在必要的时候就自动换行
Word-Wrap的默认值是Normal
Normal状态下会导致字的内容超过框架的高度/宽度

然后设置Word-Break的值为

word-break:normal;

Word-Break用于控制断句的方式
有三种的值:

normal Default. Allows line breaking within words.
break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text.(!会导致英文撕词)
keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.

 

word-wrap:break-word;word-break:break-all;  这是自己用的,但还是有问题,上面解释的非常好。

posted on 2012-07-03 16:08  那夜我还很年幼~  阅读(201)  评论(0)    收藏  举报