Thuộc tính kiểu flexWrap
Ví dụ
Thực hiện bọc các vật dụng linh hoạt nếu cần thiết:
document.getElementById("main".style.flexWrap = "wrap";
Hãy tự mình thử »Sự miêu tả
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à mục linh hoạt thì 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: | ngay bây giờ |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính flex-wrap của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Tham chiếu CSS: thuộc tính flex-wrap
Tham chiếu STYLE DOM HTML: thuộc tính flex
Tham khảo STYLE DOM HTML: thuộc tính flexBasis
HTML DOM STYLE Tham chiếu: thuộc tính flexDirection
Tham chiếu STYLE DOM HTML: thuộc tính flexFlow
Tham chiếu STYLE DOM HTML: thuộc tính flexGrow
Tham chiếu STYLE DOM HTML: thuộc tính flexShrink