aboutsummaryrefslogtreecommitdiff
path: root/files/ja/conflicting/web/css/@viewport/index.html
blob: d92f4f14dd38d52ffdca2fccde706b6f6bb52648 (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
---
title: height
slug: conflicting/Web/CSS/@viewport
tags:
  - '@viewport'
  - At-rule descriptor
  - CSS
  - CSS Descriptor
  - Reference
translation_of: Web/CSS/@viewport
translation_of_original: Web/CSS/@viewport/height
original_slug: Web/CSS/@viewport/height
---
<div>{{CSSRef}}</div>

<p><code><strong>height</strong></code> は CSS の記述子で、ビューポートの {{cssxref("@viewport/min-height", "min-height")}}{{cssxref("@viewport/max-height", "max-height")}} の両記述子を指定する一括指定記述子です。ビューポートの寸法を1つ指定すると、高さの最小値と最大値の両方を指定された値に設定します。</p>

<p>ビューポートのを2つ指定した場合は、1つ目の値は最小の高さを設定し、2つ目の値は最大の高さを設定します。</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="brush: css notranslate">/* 1つの値 */
height: auto;
height: 320px;
height: 15em;

/* Two values */
height: 320px 200px;
</pre>

<h3 id="Values" name="Values"></h3>

<dl>
 <dt><code>auto</code></dt>
 <dd>使用値は他の CSS 記述子の値から計算されます。</dd>
 <dt><code>&lt;length&gt;</code></dt>
 <dd>負の数ではない絶対的または相対的な長さです。</dd>
 <dt><code>&lt;percentage&gt;</code></dt>
 <dd>拡大率 1.0 の初期ビューポートの幅や高さに対する相対的なパーセント値で、それぞれ水平方向と垂直方向の長さを表します。負の数であってはいけません。</dd>
</dl>

<h2 id="Formal_definition" name="Formal_definition">公式定義</h2>

<p>{{cssinfo}}</p>

<h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2>

<pre class="syntaxbox notranslate">{{csssyntax}}</pre>

<h2 id="Examples" name="Examples"></h2>

<h3 id="Setting_minimum_and_maximum_height" name="Setting_minimum_and_maximum_height">高さの最小値と最大値の設定</h3>

<pre class="brush: css notranslate">@viewport {
  height: 500px;
}</pre>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Device', '#descdef-viewport-height', '"height" descriptor')}}</td>
   <td>{{Spec2('CSS3 Device')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>

<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>

<p>{{Compat("css.at-rules.viewport.height")}}</p>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li>{{cssxref("@viewport")}}</li>
</ul>