From 1230f83b7b538b7ab6fcbe0e6a8381a54b96edff Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 7 Nov 2021 01:32:20 +0900 Subject: CSS Positioned Layout のプロパティを変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/top/index.html | 134 ---------------------------------------- files/ja/web/css/top/index.md | 134 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 134 deletions(-) delete mode 100644 files/ja/web/css/top/index.html create mode 100644 files/ja/web/css/top/index.md (limited to 'files/ja/web/css/top') diff --git a/files/ja/web/css/top/index.html b/files/ja/web/css/top/index.html deleted file mode 100644 index c6ff6fb4bc..0000000000 --- a/files/ja/web/css/top/index.html +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: top -slug: Web/CSS/top -tags: - - CSS - - CSS Positioning - - CSS Property - - Reference - - 'recipe:css-property' -translation_of: Web/CSS/top ---- -
{{CSSRef}}
- -

topCSS のプロパティで、位置指定要素 (positioned elements) の垂直位置の決定に関与します。位置指定されていない要素には効果はありません。

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

top の効果は、要素がどの様に配置されているか (つまり、 {{cssxref("position")}} プロパティの値) によって変わります。

- - - -

top と {{cssxref("bottom")}} の両方が指定されており、 positionabsolute または fixed に設定されており、かつ {{cssxref("height")}} が未指定 (auto または 100% のどちらか) の場合は、 topbottom の距離が尊重されます。それ以外の場合、 {{cssxref("height")}} が何らかの形で制約されていた場合、または positionrelative に設定されていた場合は、 top プロパティが優先されて bottom プロパティは無視されます。

- -

構文

- -
/* <length> 値 */
-top: 3px;
-top: 2.4em;
-
-/* 包含ブロックの高さに対する <percentage> */
-top: 10%;
-
-/* キーワード値 */
-top: auto;
-
-/* グローバル値 */
-top: inherit;
-top: initial;
-top: unset;
-
- -

- -
-
{{cssxref("<length>")}}
-
負、null、または正の {{cssxref("<length>")}} で、以下のものを表します。 -
    -
  • 絶対位置指定要素の場合は、包含ブロックの上辺までの距離。
  • -
  • 相対位置指定要素の場合は、通常の位置からの下方向への移動量。
  • -
-
-
{{cssxref("<percentage>")}}
-
包含ブロックの高さに対する {{cssxref("<percentage>")}} です。
-
auto
-
以下のように指定します。 -
    -
  • 絶対位置指定要素では、要素の位置は {{Cssxref("bottom")}} プロパティに基づいて決まり、 height: auto は内容物の高さに基づいて決まります。また、 bottomauto であった場合は、要素は垂直方向には静的要素が配置される場合と同様に配置されます。
  • -
  • 相対位置指定要素では、通常の位置から要素までの距離は {{Cssxref("bottom")}} に基づきます。また、 bottomauto であった場合は、垂直方向には移動しません。
  • -
-
-
inherit
-
値が親要素 (包含ブロックとは限りません) の計算値と同じであることを示すキーワードです。そして、この計算値は {{cssxref("<length>")}}, {{cssxref("<percentage>")}}, または auto キーワードと同様に扱われます。
-
- -

公式定義

- -

{{CSSInfo}}

- -

形式文法

- -{{csssyntax}} - -

- -
body {
-  background: beige;
-}
-
-div {
-  position: absolute;
-  top: 10%;
-  right: 40%;
-  bottom: 20%;
-  left: 15%;
-  background: gold;
-  border: 1px solid blue;
-}
- -
<div>この内容の寸法は、辺の位置によって決まります。</div>
- -

{{EmbedLiveSample('Examples','100%','200')}}

- -

仕様書

- - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS3 Positioning', '#propdef-top', 'top')}}{{Spec2('CSS3 Positioning')}}sticky の位置の動作を追加
{{SpecName('CSS2.1', 'visuren.html#propdef-top', 'top')}}{{Spec2('CSS2.1')}}初回定義
- -

ブラウザーの互換性

- -

{{Compat("css.properties.top")}}

- -

関連情報

- - diff --git a/files/ja/web/css/top/index.md b/files/ja/web/css/top/index.md new file mode 100644 index 0000000000..c6ff6fb4bc --- /dev/null +++ b/files/ja/web/css/top/index.md @@ -0,0 +1,134 @@ +--- +title: top +slug: Web/CSS/top +tags: + - CSS + - CSS Positioning + - CSS Property + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/top +--- +
{{CSSRef}}
+ +

topCSS のプロパティで、位置指定要素 (positioned elements) の垂直位置の決定に関与します。位置指定されていない要素には効果はありません。

+ +
{{EmbedInteractiveExample("pages/css/top.html")}}
+ + + +

top の効果は、要素がどの様に配置されているか (つまり、 {{cssxref("position")}} プロパティの値) によって変わります。

+ + + +

top と {{cssxref("bottom")}} の両方が指定されており、 positionabsolute または fixed に設定されており、かつ {{cssxref("height")}} が未指定 (auto または 100% のどちらか) の場合は、 topbottom の距離が尊重されます。それ以外の場合、 {{cssxref("height")}} が何らかの形で制約されていた場合、または positionrelative に設定されていた場合は、 top プロパティが優先されて bottom プロパティは無視されます。

+ +

構文

+ +
/* <length> 値 */
+top: 3px;
+top: 2.4em;
+
+/* 包含ブロックの高さに対する <percentage> */
+top: 10%;
+
+/* キーワード値 */
+top: auto;
+
+/* グローバル値 */
+top: inherit;
+top: initial;
+top: unset;
+
+ +

+ +
+
{{cssxref("<length>")}}
+
負、null、または正の {{cssxref("<length>")}} で、以下のものを表します。 +
    +
  • 絶対位置指定要素の場合は、包含ブロックの上辺までの距離。
  • +
  • 相対位置指定要素の場合は、通常の位置からの下方向への移動量。
  • +
+
+
{{cssxref("<percentage>")}}
+
包含ブロックの高さに対する {{cssxref("<percentage>")}} です。
+
auto
+
以下のように指定します。 +
    +
  • 絶対位置指定要素では、要素の位置は {{Cssxref("bottom")}} プロパティに基づいて決まり、 height: auto は内容物の高さに基づいて決まります。また、 bottomauto であった場合は、要素は垂直方向には静的要素が配置される場合と同様に配置されます。
  • +
  • 相対位置指定要素では、通常の位置から要素までの距離は {{Cssxref("bottom")}} に基づきます。また、 bottomauto であった場合は、垂直方向には移動しません。
  • +
+
+
inherit
+
値が親要素 (包含ブロックとは限りません) の計算値と同じであることを示すキーワードです。そして、この計算値は {{cssxref("<length>")}}, {{cssxref("<percentage>")}}, または auto キーワードと同様に扱われます。
+
+ +

公式定義

+ +

{{CSSInfo}}

+ +

形式文法

+ +{{csssyntax}} + +

+ +
body {
+  background: beige;
+}
+
+div {
+  position: absolute;
+  top: 10%;
+  right: 40%;
+  bottom: 20%;
+  left: 15%;
+  background: gold;
+  border: 1px solid blue;
+}
+ +
<div>この内容の寸法は、辺の位置によって決まります。</div>
+ +

{{EmbedLiveSample('Examples','100%','200')}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Positioning', '#propdef-top', 'top')}}{{Spec2('CSS3 Positioning')}}sticky の位置の動作を追加
{{SpecName('CSS2.1', 'visuren.html#propdef-top', 'top')}}{{Spec2('CSS2.1')}}初回定義
+ +

ブラウザーの互換性

+ +

{{Compat("css.properties.top")}}

+ +

関連情報

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