Thuộc tính cột kiểu dáng
Thí dụ
Chia văn bản trong phần tử div thành ba cột:
document.getElementById("myDIV").style.columnCount = 3;
Định nghĩa và Cách sử dụng
Thuộc tính columnCount chỉ định số cột mà một phần tử sẽ được chia thành.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
columnCount | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
Cú pháp
Trả về thuộc tính columnCount:
object.style.columnCount
Đặt thuộc tính columnCount:
object.style.columnCount = "number|auto|initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
number | The optimal number of columns into which the content of the element will be flowed |
auto | Default value. The number of columns will be determined by other properties, like e.g. "column-width" |
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: | Tự động |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính số cột của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Hướng dẫn CSS3: Nhiều cột CSS3
Tham chiếu CSS: thuộc tính column-count
❮ Đối tượng phong cách