From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/css/max-height/index.html | 122 +++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 files/ja/web/css/max-height/index.html (limited to 'files/ja/web/css/max-height/index.html') diff --git a/files/ja/web/css/max-height/index.html b/files/ja/web/css/max-height/index.html new file mode 100644 index 0000000000..4d333dd365 --- /dev/null +++ b/files/ja/web/css/max-height/index.html @@ -0,0 +1,122 @@ +--- +title: max-height +slug: Web/CSS/max-height +tags: + - CSS + - CSS Property + - CSS プロパティ + - Reference +translation_of: Web/CSS/max-height +--- +
{{CSSRef}}
+ +

max-heightCSS のプロパティで、要素の最大高を設定します。これは {{Cssxref("height")}} プロパティの使用値が、 max-height に指定した値を上回ることを防ぎます。

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

max-height は {{cssxref("height")}} を上書きしますが、 {{cssxref("min-height")}} は max-height を上書きします。

+ +

構文

+ +
/* <length> 値 */
+max-height: 3.5em;
+
+/* <percentage> 値 */
+max-height: 75%;
+
+/* キーワード値 */
+max-height: none;
+max-height: max-content;
+max-height: min-content;
+max-height: fit-content(20em);
+
+/* グローバル値 */
+max-height: inherit;
+max-height: initial;
+max-height: unset;
+
+ +

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

形式文法

+ +
{{csssyntax}}
+ +

+ +
table { max-height: 75%; }
+
+form { max-height: none; }
+
+ +

アクセシビリティの考慮事項

+ +

ページを拡大縮小して文字サイズを拡大した際に、 max-height を設定した要素が他のコンテンツを切り捨てたり妨げたりしないことを確認してください。

+ + + +

仕様書

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS4 Sizing', '#width-height-keywords', 'max-height')}}{{Spec2('CSS4 Sizing')}}
{{SpecName('CSS3 Sizing', '#width-height-keywords', 'max-height')}}{{Spec2('CSS3 Sizing')}}キーワード max-content, min-content, fit-content を追加。
{{SpecName('CSS2.1', 'visudet.html#min-max-heights', 'max-height')}}{{ Spec2('CSS2.1') }}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの互換性

+ + + +

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

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf