开发者

CSS end line on letter

I'm trying to get the text in a div with a fixed width to break on a letter instead of a word. I开发者_运维技巧 cant really think of a way to explain it so I made a little example. Any help would be greatly appreciated.

What happens now.

|Hello   |
|World!  |

What I want:

|Hello Wo|
|rld!    |


word-wrap: break-word;

As per the CSS W3 Spec:

An unbreakable "word" may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line. Shaping characters are still shaped as if the word were not broken, and grapheme clusters must together stay as one unit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜