CSS sarakkeet ominaisuus
- edellinen sivu column-width
- Seuraava sivu @container
Definition and usage
The columns attribute is a shorthand attribute used to set column width and number.
See also:
CSS3 Tutorial:CSS3 monikolonna
HTML DOM Reference Manual:columns attribute
Example
Define the width and number of columns:
div { columns:100px 3; }
More examples at the bottom of the page.
CSS syntax
columns: column-width column-count;
Attribute value
Value | Description |
---|---|
column-width | Column width |
column-count | Number of columns |
Technical details
Default value: | auto auto |
---|---|
Inheritability: | no |
Version: | CSS3 |
JavaScript syntax: | object.style.columns="100px 3" |
Lisää esimerkkejä
- Column-count
- Jaa div-elementin teksti kolmeen sarakkeeseen.
- Column-gap
- Jaa div-elementin teksti kolmeen sarakkeeseen ja aseta väli 30 pikseliä.
- Column-rule
- Määrittää sarakkeiden leveyden, tyylin ja värin.
Selaimen tuki
Taulukossa olevat numerot osoittavat ensimmäisen selaimen version, joka tukee tätä ominaisuutta täysin.
Numerot, jotka sisältävät -webkit- tai -moz-, osoittavat ensimmäistä versiota, jota etuliite käytetään.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
50.0 4.0 -webkit- |
10.0 | 52.0 9.0 -moz- |
9.0 3.1 -webkit- |
37.0 15.0 -webkit- 11.1 |
- edellinen sivu column-width
- Seuraava sivu @container