有时候需要在字符串中使文字换行,但是换行符 \n 不起作用,这时候在他的HTML元素上,给他的css设置 white-space:pre-line; 这样在字符串中再加入换行符\n就可以实现字符串换行啦