如何在 CSS 中设置文本之间的空白?
要设置文本之间的空白,请使用 white-space 属性。可能的值为 normal、pre、nowrap。
示例
你可以尝试运行以下代码在 CSS 中设置文本之间的空白
<html> <head> </head> <body> <p style = "white-space:pre;"> This text has a line break and the white-space pre setting tells the browser to honor it just like the HTML pre tag.</p> </body> </html>
广告