English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
column-The count CSS attribute specifies the number of columns in a multi-column element.
The following table provides usage instructions and version history of this attribute, as well as the usage syntax of this attribute in JavaScript scripts.
Default Value: | auto |
---|---|
Applies To: | Non-replacedBlock Elementsexcept for table elements), table cells, andInline Block Elements |
Inheritance: | No |
Animatable: | Yes.Animation Attributes. |
Version: | CSS3New Feature |
JavaScript Syntax: | object.style.columnCount=5 |
The syntax of this attribute is as follows:
column-count: auto | initial | inherit
The following examples demonstrate how to use column-count Attribute.
p { -webkit-column-count: 3; /* Chrome, Safari, Opera */ -moz-column-count: 3; /* Firefox */ column-count: 3; }Test and See‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
number | A positive integer value used to specify the number of columns in a multi-column element. Ifcolumn-widthIf this property is also set to a non-auto value, it may indicate the maximum number of columns allowed. |
auto | The number of columns is determined by other CSS attributes, such ascolumn-width. This is the default value. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated elements will use their parent element's column-count Attribute Values. |
column-Browser Compatibility of count Attribute, the numbers in the following table represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorials:CSS3Multi-column Layout.
Related Attributes:column-width,column-gap,column-rule,column-rule-width,column-rule-style,column-rule-color,column-span,column-fill,columns.