CSS grid-auto-rows Właściwość
Przykład
Ustaw domyślny rozmiar wierszy w siatce:
.grid-container {
display: grid;
grid-auto-rows: 150px;
}
Definicja i użycie
Właściwość grid-auto-rows
ustawia rozmiar wierszy w kontenerze siatki.
Ta właściwość ma wpływ tylko na wiersze, których rozmiar nie jest ustawiony.
Domyślna wartość: | automatyczny |
---|---|
Dziedziczny: | nie |
Animowalny: | tak. Przeczytaj o animacji |
Wersja: | Moduł układu siatki CSS, poziom 1 |
Składnia JavaScript: | obiekt .style.gridAutoRows="60px" |
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Property | |||||
---|---|---|---|---|---|
grid-auto-rows | 57 | 16 | 52 | 10 | 44 |
Składnia CSS
grid-auto-rows: auto|max-content|min-content|length;
Wartości nieruchomości
Value | Description | Play it |
---|---|---|
auto | Default value. The size of the rows is determined by the size of the largest item 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 largest item in the row | |
length | Sets the size of the rows, by using a legal length value. Read about length units |
Powiązane strony
Samouczek CSS: układ siatki CSS
CSS Reference: Właściwość grid -auto-columns