Thuộc tính đếm cột kiểu
Ví dụ
Chia văn bản trong phần tử div thành ba cột:
document.getElementById("myDIV").style.columnCount = 3;
Hãy tự mình thử »Sự miêu tả
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 cộtCount:
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ả về: | Một Chuỗi, biểu thị thuộc tính đếm cột của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Hướng dẫn CSS3: CSS3 nhiều cột
Tham chiếu CSS: thuộc tính đếm cột