Propiedad columnCount de estilo
Ejemplo
Divide el texto en el elemento div en tres columnas:
document.getElementById("myDIV").style.columnCount = 3;
Definición y uso
La propiedad columnCount especifica el número de columnas en las que se debe dividir un elemento.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
columnCount | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
Sintaxis
Devuelve la propiedad columnCount:
object.style.columnCount
Establezca la propiedad columnCount:
object.style.columnCount = "number|auto|initial|inherit"
Valores de propiedad
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 |
Detalles técnicos
Valor por defecto: | auto |
---|---|
Valor devuelto: | Una cadena, que representa la propiedad de recuento de columnas de un elemento |
Versión CSS | CSS3 |
páginas relacionadas
Tutorial de CSS3: columnas múltiples de CSS3
Referencia de CSS: propiedad de recuento de columnas
❮ Objeto de estilo