Thuộc tính flexWrap kiểu dáng
Thí dụ
Làm cho các mục linh hoạt bọc nếu cần thiết:
document.getElementById("main".style.flexWrap = "wrap";
Định nghĩa và Cách sử dụng
Thuộc tính flexWrap chỉ định xem các mục linh hoạt có nên bọc hay không.
Lưu ý: Nếu các phần tử không phải là các mục linh hoạt, thuộc tính flexWrap không có hiệu lực.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
flexWrap | Yes | 11.0 | Yes | 9.0 | Yes |
Cú pháp
Trả về thuộc tính flexWrap:
object.style.flexWrap
Đặt thuộc tính flexWrap:
object.style.flexWrap = "nowrap|wrap|wrap-reverse|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
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 |
Chi tiết kỹ thuật
Giá trị mặc định: | bây giờ |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính flex-wrap của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Tham chiếu CSS: thuộc tính flex-wrap
Tham chiếu HTML DOM STYLE: thuộc tính flex
HTML DOM STYLE Tham chiếu: thuộc tính flexBasis
Tham chiếu HTML DOM STYLE: thuộc tính flexDirection
Tham chiếu HTML DOM STYLE: thuộc tính flexFlow
HTML DOM STYLE Tham khảo: thuộc tính flexGrow
HTML DOM STYLE Tham khảo: thuộc tính flexShrink
❮ Đối tượng phong cách