在html页面填入字符串,\n换行不起作用,怎么办? 2022-02-17 本文已影响0人 生于乱世 CSS white-space 属性 image.png 可以在DOM元素中使用white-space: pre-line;这样在html页面填入字符串,\n换行就起作用了。