CSS -Eigenschaft grid-auto- rows
Beispiel
Legen Sie eine Standardgröße für die Zeilen in einem Raster fest:
.grid-container {
display: grid;
grid-auto-rows: 150px;
}
Definition und Verwendung
Die grid-auto-rows
Eigenschaft legt eine Größe für die Zeilen in einem Rastercontainer fest.
Diese Eigenschaft betrifft nur Zeilen mit nicht festgelegter Größe.
Standardwert: | Auto |
---|---|
Vererbt: | Nein |
Animierbar: | ja. Lesen Sie mehr über animierbare |
Ausführung: | CSS-Grid-Layout-Modul Stufe 1 |
JavaScript-Syntax: | Objekt .style.gridAutoRows="60px" |
Browser-Unterstützung
Die Zahlen in der Tabelle geben die erste Browserversion an, die die Eigenschaft vollständig unterstützt.
Property | |||||
---|---|---|---|---|---|
grid-auto-rows | 57 | 16 | 52 | 10 | 44 |
CSS-Syntax
grid-auto-rows: auto|max-content|min-content|length;
Eigenschaftswerte
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 |
Verwandte Seiten
CSS-Tutorial: CSS-Grid-Layout
CSS-Referenz: Die Eigenschaft grid-auto-columns