Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

ปิดใช้งานการตัดข้อความภายในองค์ประกอบโดยใช้ CSS


หากต้องการปิดใช้งานการตัดข้อความภายในองค์ประกอบ ให้ใช้คุณสมบัติ white-space คุณสามารถลองรันโค้ดต่อไปนี้เพื่อใช้คุณสมบัติ 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>