使用 CSS 停用元素內部的文字換行
要停用元素內部的文字換行,請使用 white-space 屬性。 يمكنك محاولة تشغيل رمز التعليمات البرمجية التالي لتنفيذ خاصية المسافة البيضاء
مثال
<!DOCTYPE html> <html> <head> <style> p { white-space: nowrap; } </style> </head> <body> <p> This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is some text. This is demo text. </p> </body> </html>
廣告