设置了一定的宽度和高度。但无论是下面哪句都无效。
word-break: break-word;
word-wrap: break-word;
原因竟然是因为 /* white-space: nowrap; */
将其改为normal即可:
width: 145px;
height: auto;
word-break: break-word;
word-wrap: break-word;
white-space: normal;
设置了一定的宽度和高度。但无论是下面哪句都无效。
word-break: break-word;
word-wrap: break-word;
原因竟然是因为 /* white-space: nowrap; */
将其改为normal即可:
width: 145px;
height: auto;
word-break: break-word;
word-wrap: break-word;
white-space: normal;