aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/min-height/index.md
blob: 27fbb98ff59a4c34a92d390c3a658321d464b5a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
title: min-height
slug: Web/CSS/min-height
tags:
  - CSS
  - CSS プロパティ
  - レイアウト
  - 最小
  - リファレンス
  - 寸法
  - height
  - min-height
  - recipe:css-property
  - size
browser-compat: css.properties.min-height
translation_of: Web/CSS/min-height
---
{{CSSRef}}

**`min-height`** は [CSS](/ja/docs/Web/CSS) のプロパティで、要素の最小幅を設定します。これは {{cssxref("height")}} プロパティの[使用値](/ja/docs/Web/CSS/used_value)が、`min-height` で指定した値を下回ることを防ぎます。

{{EmbedInteractiveExample("pages/css/min-height.html")}}

`min-height` の値が {{cssxref("max-height")}} および {{cssxref("height")}} の値より大きい場合は、`min-height` の値が要素の幅になります。

## 構文

```css
/* <length> 値 */
min-height: 3.5em;

/* <percentage> 値 */
min-height: 10%;

/* キーワード値 */
min-height: max-content;
min-height: min-content;
min-height: fit-content(20em);

/* グローバル値 */
min-height: inherit;
min-height: initial;
min-height: revert;
min-height: unset;
```

### 値

- {{cssxref("&lt;length&gt;")}}
  - : `min-height` を絶対的な値で定義します。
- {{cssxref("&lt;percentage&gt;")}}
  - : `min-height` を包含ブロックの高さに対するパーセント値で定義します。
- `auto`
  - : ブラウザーが指定された要素の `min-height` を計算して選択します。
- `max-content`
  - : 内容物が推奨する `min-height` です。
- `min-content`
  - : 内容物の最小の `min-height` です。
- `fit-content({{cssxref("&lt;length-percentage&gt;")}})`
  - : 利用可能な空白を指定された引数で置き換えた `fit-content` 式を使用します。すなわち、 `min(max-content, max(min-content, 引数))` です。

## 公式定義

{{cssinfo}}

## 形式文法

{{csssyntax}}

## 例

### min-height の設定

```css
table { min-height: 75%; }

form { min-height: 0; }
```

## 仕様書

{{Specifications}}

## ブラウザーの互換性

{{Compat("css.properties.min-height")}}

## 関連情報

- [ボックスモデル](/ja/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model), {{cssxref("box-sizing")}}
- {{cssxref("height")}}, {{cssxref("max-height")}}