Propriedade CSS grid-auto-columns
Exemplo
Defina um tamanho padrão para as colunas em uma grade:
.grid-container {
display: grid;
grid-auto-columns: 50px;
}
Definição e uso
A grid-auto-columns
propriedade define um tamanho para as colunas em um contêiner de grade.
Esta propriedade afeta apenas colunas com o tamanho não definido.
Valor padrão: | auto |
---|---|
Herdado: | não |
Animavel: | sim. Leia sobre animáveis |
Versão: | Módulo de Layout de Grade CSS Nível 1 |
Sintaxe JavaScript: | objeto .style.gridAutoColumns="120px" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Property | |||||
---|---|---|---|---|---|
grid-auto-columns | 57 | 16 | 52 | 10 | 44 |
Sintaxe CSS
grid-auto-columns: auto|max-content|min-content|length;
Valores de propriedade
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 |
Páginas relacionadas
Tutorial CSS: Layout de grade CSS
Referência CSS: A propriedade grid-auto-rows