From 60367cb41ff3291f2d5c1a03feeb26645c7cd336 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 16 Nov 2021 23:03:12 +0900 Subject: CSS 論理的プロパティのボックスモデルのプロパティを変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/margin-block-end/index.md | 108 +++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 files/ja/web/css/margin-block-end/index.md (limited to 'files/ja/web/css/margin-block-end/index.md') diff --git a/files/ja/web/css/margin-block-end/index.md b/files/ja/web/css/margin-block-end/index.md new file mode 100644 index 0000000000..a5ce96938f --- /dev/null +++ b/files/ja/web/css/margin-block-end/index.md @@ -0,0 +1,108 @@ +--- +title: margin-block-end +slug: Web/CSS/margin-block-end +tags: + - CSS + - CSS Logical Property + - CSS Property + - CSS プロパティ + - CSS 論理的プロパティ + - Experimental + - NeedsContent + - Reference + - margin-block + - margin-block-end +translation_of: Web/CSS/margin-block-end +--- +
{{CSSRef}}{{SeeCompatTable}}
+ +

margin-block-endCSS のプロパティで、要素のインライン方向の論理的な先頭側のマージンを定義し、それが要素の書字方向やテキストの方向に応じて物理的なマージンに対応付けられます。

+ +
{{EmbedInteractiveExample("pages/css/margin-block-end.html")}}
+ + + +

構文

+ +
/* <length> 値 */
+margin-block-end: 10px;  /* 絶対的な長さ */
+margin-block-end: 1em;   /* テキストの大きさに対する相対値 */
+margin-block-end: 5%;    /* 直近のブロックコンテナーの大きさに対する相対値 */
+
+/* キーワード値 */
+margin-block-end: auto;
+
+/* グローバル値 */
+margin-block-end: inherit;
+margin-block-end: initial;
+margin-block-end: unset;
+
+ +

これは {{cssxref("margin-top")}}, {{cssxref("margin-right")}}, {{cssxref("margin-bottom")}}, {{cssxref("margin-left")}} の何れかのプロパティに対応し、どれに対応するかは {{cssxref("writing-mode")}}, {{cssxref("direction")}}, {{cssxref("text-orientation")}} で定義された値によって決まります。

+ +

関連プロパティとして、要素の他のマージンを定義する {{cssxref("margin-block-start")}}, {{cssxref("margin-inline-start")}}, {{cssxref("margin-inline-end")}} があります。

+ +

{{cssinfo}}

+ +

+ +

margin-block-end プロパティは {{cssxref("margin-left")}} プロパティと同じ値を取ります。

+ +

形式文法

+ +{{csssyntax}} + +

+ +

HTML

+ +
<div>
+  <p class="exampleText">Example text</p>
+</div>
+
+ +

CSS

+ +
div {
+  background-color: yellow;
+  width: 120px;
+  height: 120px;
+}
+
+.exampleText {
+  writing-mode: vertical-lr;
+  margin-block-end: 20px;
+  background-color: #c8c800;
+}
+ +

{{EmbedLiveSample("Example", 140, 140)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS Logical Properties", "#propdef-margin-block-end", "margin-block-end")}}{{Spec2("CSS Logical Properties")}}初回定義
+ +

ブラウザーの互換性

+ +

{{Compat("css.properties.margin-block-end")}}

+ +

関連情報

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