如何让 HTML 识别 string 里的 ' ' 并成功换行 只要在结果所在的 div 的 css 设置: white-space: pre-line; 然后页面就能成功识别 ' ' 并整齐的显示结果了。