css word-wrap: break-word won't work

前端 未结 6 1699
鱼传尺愫
鱼传尺愫 2021-02-02 17:11

I have two inline span. code sample:

    
6条回答
  •  时光说笑
    2021-02-02 17:47

    I ran into the same problem, with none of the answers here fixing the problem.

    Turns out the template (angular material) I was using applied white-space: nowrap. Removing or overriding this with white-space: normal made word-break: break-all or word-break: break-word work.

    Perhaps this will help someone else searching for the same issue.

提交回复
热议问题