连续多个标点符号 word-wrap word-break失效
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
div {
width: 300px;
background: red;
/* overflow: hidden; */
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
}
</style>
</head>
<body>
<div>
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
</div>
</body>
</html>
同时使用word-wrap word-break就会导致连续标点无法换行,单独使用word-wrap虽然标点会换行但是英文或url之类的文字换行是不会充满一整行的
把word-break: break-all删掉就行了
中文、英文、符号都能换行了