The problem that words are cut off when Vue rich text English wraps

Problem: Words are cut off when English text wraps
insert image description here
. Solution:

.koolcar_text {
    
    
  white-space: pre-wrap;
  word-break: break-word;
}
  1. Style white-space: pre-wrapcan ensure that the text is output as it is (one-quarter of the space is occupied)
  2. Style word-break: break-wordcan 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:
insert image description here

Guess you like

Origin blog.csdn.net/Jackson_Wen/article/details/128148484