aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/flex_value/index.html
blob: 27160362e2c0c2dd354c6a765435e33c7fcbcda5 (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
---
title: <flex>
slug: Web/CSS/flex_value
tags:
  - CSS
  - CSS Data Type
  - CSS データ型
  - Layout
  - Reference
  - Web
  - ウェブ
  - リファレンス
  - レイアウト
translation_of: Web/CSS/flex_value
---
<div>{{CSSRef}}</div>

<p><a href="/ja/docs/Web/CSS">CSS</a><strong><code>&lt;flex&gt;</code></strong> <a href="/ja/docs/Web/CSS/CSS_Types">データ型</a> は、グリッドコンテナー内部における可変の長さです。 {{cssxref("grid-template-columns")}}{{cssxref("grid-template-rows")}} 及びほかの関連プロパティで使われます。</p>

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

<p><code>&lt;flex&gt;</code> データ型は {{cssxref("&lt;number&gt;")}} のあとに単位 <code id="fr">fr</code> が付きます。すべての CSS dimensions と同様に、数値と単位の間に空白は入れません。</p>

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

<pre class="brush: css">1fr    /* 整数値の使用 */
2.5fr  /* 浮動小数点値の使用 */
</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("CSS Grid", "#typedef-flex", "&lt;flex&gt;")}}</td>
   <td>{{Spec2("CSS Grid")}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>

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

<p>{{Compat("css.types.flex")}}</p>

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

<ul>
 <li><a href="/ja/docs/Web/CSS/CSS_Grid_Layout">CSS グリッドレイアウト</a></li>
</ul>