主頁
CSS
CSS 文字
文字間距
Tryit:使用 white-space
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> p { white-space: nowrap; } </style> </head> <body> <h1>Using white-space</h1> <p> This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. This is some text that will not wrap. </p> <p>Try to remove the white-space property to see the difference!</p> </body> </html>