Thuộc tính cột kiểu
Thí 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";
Định nghĩa và Cách sử dụng
Thuộc tính cột là một thuộc tính viết tắt để đặt columnWidth và columnCount.
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: | xe ô tô |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính 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 cột
❮ Đối tượng phong cách