Thuộc tính cột kiểu
Ví dụ
Chia văn bản thành ba cột, mỗi cột tối thiểu 100 pixel:
document.getElementById("myDIV").style.columns = "100px 3";
Hãy tự mình thử »Sự miêu tả
Thuộc tính cột là thuộc tính viết tắt để thiết lập cộtWidth và cộtCount.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
columns | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
Cú pháp
Trả về thuộc tính cột:
object .style.columns
Đặt thuộc tính cột:
object .style.columns = "auto| column-width column-count |initial|inherit"
Giá trị tài sản
Value | Description |
---|---|
auto | Default value. Sets both the column width to "auto" and the column-count to "auto" |
columnWidth | The width of the columns |
columnCount | The number of columns |
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 tự động |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính 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 cột