Is it possible to have text-overflow: ellipsis without white-space: nowrap?

廉价感情. 提交于 2019-11-30 04:57:54

Unfortunately the behavior you are seeing is correct for text-overflow: ellipsis.

Cross-browser support for hyphenated text is not a reality yet with CSS only, but you can see a good roundup of what's possible here: http://code.google.com/p/hyphenator/wiki/en_CSS3Hyphenation

Some browser-specific CSS is available for firefox and webkit browsers:

-webkit-hyphens: auto;
-webkit-hyphenate-character: '~';
-moz-hyphens: auto;

The big issue with hyphenation is that it needs to be language aware to work properly, which is tricky.

Maybe a JS solution like this will help you? http://code.google.com/p/hyphenator/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!