CSS word-breakคุณสมบัติ
ตัวอย่าง
แบ่งคำที่ตัวอักษรใด ๆ :
p.a {
word-break: break-all;
}
ความหมายและการใช้งาน
คุณสมบัติword-break
ระบุว่าควรแบ่งคำอย่างไรเมื่อถึงจุดสิ้นสุดบรรทัด
ค่าเริ่มต้น: | ปกติ |
---|---|
รับการถ่ายทอด: | ใช่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.wordBreak="break-all" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
word-break | 4.0 | 5.5 | 15.0 | 3.1 | 15.0 |
ไวยากรณ์ CSS
word-break: normal|break-all|keep-all|break-word|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description |
---|---|
normal | Default value. Uses default line break rules |
break-all | To prevent overflow, word may be broken at any character |
keep-all | Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as value "normal" |
break-word | To prevent overflow, word may be broken at arbitrary points |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |