CSS word-wrapคุณสมบัติ
ตัวอย่าง
อนุญาตให้คำยาวๆ สามารถตัดและตัดเป็นบรรทัดถัดไปได้:
div {
word-wrap: break-word;
}
ความหมายและการใช้งาน
คุณสมบัติword-wrap
นี้ช่วยให้สามารถตัดคำที่ยาวและตัดเป็นบรรทัดถัดไปได้
ค่าเริ่มต้น: | ปกติ |
---|---|
รับการถ่ายทอด: | ใช่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.wordWrap="break-word" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
word-wrap | 4.0 | 5.5 | 3.5 | 3.1 | 10.5 |
ไวยากรณ์ CSS
word-wrap: normal|break-word|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description |
---|---|
normal | Break words only at allowed break points. This is default |
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 |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Text Effects