สไตล์wordWrapคุณสมบัติ
ตัวอย่าง
อนุญาตให้คำยาวๆ สามารถตัดและตัดเป็นบรรทัดถัดไปได้:
document.getElementById("myDIV").style.wordWrap = "break-word";
ความหมายและการใช้งาน
คุณสมบัติ wordWrap ช่วยให้สามารถแยกคำที่ยาวและตัดเป็นบรรทัดถัดไปได้
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
wordWrap | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติ wordWrap:
object.style.wordWrap
ตั้งค่าคุณสมบัติ wordWrap:
object.style.wordWrap = "normal|break-word|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
normal | Break words only at allowed break points |
break-word | Allows unbreakable words to be broken |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | ปกติ |
---|---|
คืนมูลค่า: | A String แทนคุณสมบัติ word-wrap ของ element |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติการตัดคำ
❮ สไตล์วัตถุ