Problem: Words are cut off when English text wraps
. Solution:
.koolcar_text {
white-space: pre-wrap;
word-break: break-word;
}
- Style
white-space: pre-wrap
can ensure that the text is output as it is (one-quarter of the space is occupied) - Style
word-break: break-word
can prevent the text from exceeding the limit (break-word will not cut off the word, break-all will cut off the word regardless of the integrity of the word)
Optimized effect: