Why doesn't word-wrap work properly in CSS3?

前端 未结 7 566
温柔的废话
温柔的废话 2021-02-01 01:44

Why doesn\'t word wrap property work properly in the example below?

http://jsfiddle.net/k5VET/739/

What can I do to ensure that part of the word \'consectetur\'

相关标签:
7条回答
  • 2021-02-01 02:14

    It does not wrap properly, because browsers do not apply automatic hyphenation (which would be the way to cause proper wrapping) by default. You need to use CSS hyphenation or JavaScipt-based hyphenation. The setting word-wrap:break-word, as well as word-break: break-all, by definition breaks words (splits th em to piece s at arbit rary poin ts), instead of proper wrapping.

    0 讨论(0)
提交回复
热议问题