像这样的东西。希望我已经理解正确
<强> FIDDLE 强>
div {
width: 20px;
background: red;
word-wrap: break-word;
}
或 FIDDLE
div {
width: 20px;
background: red;
word-break:break-all;
}
添加word-break:break-all
:
div {
width: 20px;
background: red;
word-break:break-all;
}
jsbin example
尝试
div {
width: 20px;
background: red;
overflow-wrap:break-word;
}
注意:此属性具有工作草稿状态