--- title: max-height slug: Web/CSS/@viewport/max-height tags: - '@viewport' - CSS - CSS Descriptor - Reference translation_of: Web/CSS/@viewport translation_of_original: Web/CSS/@viewport/max-height ---
CSS の max-height 記述子は、{{cssxref("@viewport")}} @-規則で定義された文書のビューポートの最大の高さを指定します。
最大の高さの制約を考慮して、最初の高さは初期ビューポートの高さにできるだけ近い値に設定されます。
{{cssinfo}}
/* Keyword value */ max-height: auto; /* <length> values */ max-height: 400px; max-height: 50em; max-height: 20cm; /* <percentage> value */ max-height: 75%;
auto<length><percentage>{{csssyntax}}
@viewport {
max-height: 600px;
}
| 仕様書 | 策定状況 | コメント |
|---|---|---|
| {{SpecName('CSS3 Device', '#descdef-viewport-max-height', '"max-height" descriptor')}} | {{Spec2('CSS3 Device')}} | 初期定義 |
{{Compat("css.at-rules.viewport.max-height")}}