คุณสมบัติCSS flex-wrap
ตัวอย่าง
ห่อสิ่งของที่ยืดหยุ่นได้หากจำเป็น:
div {
display: flex;
flex-wrap: wrap;
}
ความหมายและการใช้งาน
คุณสมบัติflex-wrap
ระบุว่ารายการที่ยืดหยุ่นควรห่อหรือไม่
หมายเหตุ:หากองค์ประกอบไม่ใช่รายการที่ยืดหยุ่น พร็อพเพอร์flex-wrap
ตี้จะไม่มีผล
ค่าเริ่มต้น: | นาวแรป |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.flexWrap="nowrap" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
ตัวเลขตามด้วย -webkit- หรือ -moz- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
flex-wrap | 29.0 21.0 -webkit- |
11.0 | 28.0 18.0 -moz- |
9.0 6.1 -webkit- |
17.0 |
ไวยากรณ์ CSS
flex-wrap: nowrap|wrap|wrap-reverse|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
nowrap | Default value. Specifies that the flexible items will not wrap | |
wrap | Specifies that the flexible items will wrap if necessary | |
wrap-reverse | Specifies that the flexible items will wrap, if necessary, in reverse order | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
บทช่วยสอน CSS: CSS Flexible Box
การอ้างอิง CSS: คุณสมบัติ flex
การอ้างอิง CSS: คุณสมบัติ flex-flow
การอ้างอิง CSS: คุณสมบัติ flex-direction
การอ้างอิง CSS: คุณสมบัติพื้นฐานแบบยืดหยุ่น
การอ้างอิง CSS: คุณสมบัติ flex-grow
การอ้างอิง CSS: คุณสมบัติ flex-shrink
การอ้างอิง HTML DOM: คุณสมบัติ flexWrap