图片来源:W3C
部分引自大佬:https://zhidao.baidu.com/question/424920602093167052.html
强制不换行
div{
white-space:nowrap;
}
自动换行
div{
word-wrap: break-word;
word-break: normal;
}
- word-wrap
- word-break
强制英文单词断行
div{
word-break:break-all;
}
图片来源:W3C
部分引自大佬:https://zhidao.baidu.com/question/424920602093167052.html
div{
white-space:nowrap;
}
div{
word-wrap: break-word;
word-break: normal;
}
div{
word-break:break-all;
}