How to mimic word-break: break-word; for IE9, IE11 and Firefox

前端 未结 3 786
醉酒成梦
醉酒成梦 2021-02-07 02:27

How to mimic word-break: break-word; for IE9, IE11 and Firefox?

It seems to work in Chrome. I have learnt and understood that it is a is non-standard, webki

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 03:05

    I have had good success in Chrome, Firefox and IE with using only:

    word-break: break-word;
    word-wrap: break-word;
    

    In my problem case I was already using:

    display: table-cell;
    

    and I ended up having to include

    max-width: 440px;
    

    to get wrapping in all browsers. In most cases the max-width was not necessary.

提交回复
热议问题