开发者

How can you break text that is really long?

开发者 https://www.devze.com 2023-04-11 05:46 出处:网络
I am not 开发者_如何学编程quite sure how to do this. I\'m trying to break up text that is too long. (E.g. hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)

I am not 开发者_如何学编程quite sure how to do this.

I'm trying to break up text that is too long. (E.g. hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)

I've tried using word-wrap: break-word; but this isn't doing anything.


word-break was now renamed to overflow-wrap as you can read in the spec. But browsers should accept the word-break rule.

You can also try to play around with text-overflow a litte bit. PPK wrote about it here and you can find more about it on MDN.


Check out the -webkit-hyphens css3 property. There is support for some other vendor prefixes as well.

http://drublic.de/blog/css3-auto-hyphenation-for-text-elements/

0

精彩评论

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

关注公众号