Proprietà CSS grid-auto-colonne
Esempio
Imposta una dimensione predefinita per le colonne in una griglia:
.grid-container {
display: grid;
grid-auto-columns: 50px;
}
Definizione e utilizzo
La grid-auto-columns
proprietà imposta una dimensione per le colonne in un contenitore griglia.
Questa proprietà interessa solo le colonne con la dimensione non impostata.
Valore di default: | auto |
---|---|
Ereditato: | no |
Animabile: | sì. Leggi su animabile |
Versione: | Modulo layout griglia CSS Livello 1 |
sintassi JavaScript: | oggetto .style.gridAutoColumns="120px" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
grid-auto-columns | 57 | 16 | 52 | 10 | 44 |
Sintassi CSS
grid-auto-columns: auto|max-content|min-content|length;
Valori di proprietà
Value | Description | Play it |
---|---|---|
auto | Default value. The size of the columns is determined by the size of the container | |
fit-content() | ||
max-content | Sets the size of each column depending on the largest item in the column | |
min-content | Sets the size of each column depending on the smallest item in the column | |
minmax(min.max) | Sets a size range greater than or equal to min and less than or equal to max | |
length | Sets the size of the columns, by using a legal length value. Read about length units | |
% | Sets the size of the columns, by using a percent value |
Pagine correlate
Esercitazione CSS: layout della griglia CSS
Riferimento CSS: la proprietà grid-auto-rows