https://stackoverflow.com/questions/23763482/text-not-wrapping-inside-a-div-element
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文本自动换行</title>
<style>
.wordWrap {
/*这两行代码可以解决大部分场景下的换行问题*/
word-break: break-all;
word-wrap: break-word;
/*但在有些场景中,还需要加上下面这行代码*/
white-space: normal;
}
</style>
<!--原文链接:https://stackoverflow.com/questions/23763482/text-not-wrapping-inside-a-div-element-->
</head>
<body>
<div class="wordWrap" style="width: 200px;height: 100px;border: red solid 1px;">
11111111111111111111111111111111111111111
</div>
</body>
</html>