CSSgrid -auto-rowsプロパティ
例
グリッド内の行のデフォルトサイズを設定します。
.grid-container {
display: grid;
grid-auto-rows: 150px;
}
定義と使用法
このgrid-auto-rows
プロパティは、グリッドコンテナの行のサイズを設定します。
このプロパティは、サイズが設定されていない行にのみ影響します。
デフォルト値: | 自動 |
---|---|
遺伝性の: | いいえ |
アニメート可能: | はい。アニメート可能について読む |
バージョン: | CSSグリッドレイアウトモジュールレベル1 |
JavaScript構文: | オブジェクト.style.gridAutoRows = "60px" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
grid-auto-rows | 57 | 16 | 52 | 10 | 44 |
CSS構文
grid-auto-rows: auto|max-content|min-content|length;
プロパティ値
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 |
関連ページ
CSSチュートリアル:CSSグリッドレイアウト
CSSリファレンス:grid-auto-columnsプロパティ