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

前端 未结 7 604
温柔的废话
温柔的废话 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:02

    Use word-break: break-all;

    #fos { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size:14px;
        font-weight: normal;
        line-height: 18px;
        width: 238px;
        height:38px;
        cursor: pointer;
    word-break: break-all;
        border:2px solid; }
    

    LIVE DEMO

提交回复
热议问题