Propriedade CSS grid-template-rows
Exemplo
Especifique o tamanho da linha (altura):
.grid-container {
display: grid;
grid-template-rows:
100px 300px;
}
Definição e uso
A grid-template-rows
propriedade especifica o número (e as alturas) das linhas em um layout de grade.
Os valores são uma lista separada por espaços, onde cada valor especifica a altura da respectiva linha.
Valor padrão: | Nenhum |
---|---|
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.gridTemplateRows="50px 200px" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Property | |||||
---|---|---|---|---|---|
grid-template-rows | 57 | 16 | 52 | 10 | 44 |
Sintaxe CSS
grid-template-rows: none|auto|max-content|min-content|length|initial|inherit;
Valores de propriedade
Value | Description | Play it |
---|---|---|
none | No size is set. Rows are created if needed | |
auto | The size of the rows is determined by the size of the container, and on the size of the content of the items in the row | |
max-content | Sets the size of each row to depend on the largest item in the row | |
min-content | Sets the size of each row to depend on the smallest item in the row | |
length | Sets the size of the rows, by using a legal length value. Read about length units |
Páginas relacionadas
Tutorial CSS: Layout de grade CSS
Referência CSS: A propriedade grid-columns
Referência CSS: A propriedade grid-template