CSS line wrapping

前端 未结 3 1534
粉色の甜心
粉色の甜心 2020-12-19 01:05

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:58

    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.

提交回复
热议问题