How to break word after special character like Hyphens (-)

后端 未结 11 2020
南方客
南方客 2020-12-04 17:31

Given a relatively simple CSS:

11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 18:10

    Your example works as expected in Google Chrome, Safari (Windows), and IE8. The text breaks out of the 150px box in Firefox 3 and Opera 9.5.

    Additionally ­ won't work for your example, as it will either:

    • work when word-breaking but when not word-breaking not display any hyphens, or

    • work when not word-breaking but display two hyphens when word-breaking since it adds a hyphen on a break.

提交回复
热议问题