How to force breaking of non breakable strings?

后端 未结 9 1068
-上瘾入骨i
-上瘾入骨i 2021-02-04 18:52

I have an HTML page that I generate from the data contained in a database. The database sometimes contains long strings that the browser can\'t break because the strings don\'t

9条回答
  •  你的背包
    2021-02-04 19:25

    It is also possible to use word-break css property to cut every word on the element edge.

    .selector_name {
      word-break: break-all;
    }
    
    

    some words some words some words some words

    you can obtain: some word| s some wo|<-edge of the element rds some | words som| e words |

提交回复
热议问题