CSS line wrapping

前端 未结 3 2163
予麋鹿
予麋鹿 2020-12-19 01:25

Given a block container

this is a very long string which contains a bunch of characters that I want to break at container edges.
3条回答
  •  余生分开走
    2020-12-19 01:56

    There's a CSS3 property called word-break that may be of some use to you in future.

    More information is available here: http://www.css3.com/css-word-break/

    The break-all value looks to do the thing you're asking for:

    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.

    As for more supported versions of CSS, I don't believe there's a way you can do this.

提交回复
热议问题