Thuộc tính style flexDirection
Thí dụ
Sắp xếp lại hướng của các mục linh hoạt bên trong phần tử <div>:
document.getElementById("main").style.flexDirection = "column-reverse";
Định nghĩa và Cách sử dụng
Thuộc tính flexDirection đặt hoặc trả về hướng của các mục linh hoạt.
Lưu ý: Nếu phần tử không phải là một mục linh hoạt, thuộc tính flexDirection không có hiệu lực.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
flexDirection | Yes | 11.0 | Yes | 9.0 | Yes |
Cú pháp
Trả về thuộc tính flexDirection:
object.style.flexDirection
Đặt thuộc tính flexDirection:
object.style.flexDirection = "row|row-reverse|column|column-reverse|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
row | Default value. The flexible items are displayed horizontally, as a row |
row-reverse | Same as row, but in reverse order |
column | The flexible items are displayed vertically, as a column |
column-reverse | Same as column, but 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: | chèo thuyền |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính hướng linh hoạt 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-direction
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 flexFlow
HTML DOM STYLE Tham khảo: thuộc tính flexGrow
HTML DOM STYLE Tham khảo: thuộc tính flexShrink
HTML DOM STYLE Tham khảo: thuộc tính flexWrap
❮ Đối tượng phong cách