Propriété de style columnCount
Exemple
Divisez le texte de l'élément div en trois colonnes :
document.getElementById("myDIV").style.columnCount = 3;
Définition et utilisation
La propriété columnCount spécifie le nombre de colonnes dans lesquelles un élément doit être divisé.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
columnCount | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
Syntaxe
Renvoyez la propriété columnCount :
object.style.columnCount
Définissez la propriété columnCount :
object.style.columnCount = "number|auto|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | auto |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété de nombre de colonnes d'un élément |
Version CSS | CSS3 |
Pages connexes
Tutoriel CSS3 : Colonnes multiples CSS3
Référence CSS : propriété de nombre de colonnes
❮ Objet de style