CSS overflow-wrapคุณสมบัติ
ตัวอย่าง
อนุญาตให้เบราว์เซอร์แบ่งบรรทัดด้วยคำยาว ๆ หากล้นคอนเทนเนอร์:
div {
overflow-wrap: break-word;
}
ความหมายและการใช้งาน
คุณสมบัติoverflow-wrap
ระบุว่าเบราว์เซอร์สามารถแบ่งบรรทัดด้วยคำยาวๆ ได้หรือไม่ ถ้าคำเหล่านั้นล้นคอนเทนเนอร์
ค่าเริ่มต้น: | ปกติ |
---|---|
รับการถ่ายทอด: | ใช่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.overflowWrap="ปกติ" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
overflow-wrap | 23.0 | 18.0 | 49.0 | 6.1 | 12.1 |
ไวยากรณ์ CSS
overflow-wrap: normal|anywhere|break-word|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
normal | Long words will not break, even if they overflow the container. This is default | |
anywhere | Long words will break if they overflow the container | |
break-word | Long words will break if they overflow the container | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS ล้น