Thuộc tính kiểu flexFlow
Ví dụ
Làm cho các mục linh hoạt hiển thị theo cột và không bị gói:
document.getElementById("main").style.flexFlow = "column nowrap";
Hãy tự mình thử »Sự miêu tả
Thuộc tính flexFlow là thuộc tính viết tắt của thuộc tính flexDirection và flexWrap.
Thuộc tính flexDirection chỉ định hướng của các mục linh hoạ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 flexFlow không có hiệu lực.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
flexFlow | Yes | 11.0 | Yes | 9.0 | Yes |
Cú pháp
Trả về thuộc tính flexFlow:
object .style.flexFlow
Đặt thuộc tính flexFlow:
object .style.flexFlow = "flex-direction flex-wrap |initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
flex-direction | Possible values: row row-reverse column column-reverse initial inherit Default value is "row". Specifying the direction of the flexible items |
flex-wrap | Possible values: nowrap wrap wrap-reverse initial inherit Default value is "nowrap". Specifying whether the flexible items should wrap or not |
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: | hàng ngay bây giờ |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính flex-flow của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Tham khảo CSS: thuộc tính flex-flow
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 flexGrow
Tham chiếu STYLE DOM HTML: thuộc tính flexShrink
HTML DOM STYLE Tham khảo: thuộc tính flexWrap