From f1650fbb27022456d9fc3ff8cd4b5ec676ca3a2e Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 12 Nov 2021 01:05:16 +0900 Subject: CSS Backgrounds and Borders 背景関係のプロパティの変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/background-origin/index.html | 110 -------------------------- files/ja/web/css/background-origin/index.md | 110 ++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 110 deletions(-) delete mode 100644 files/ja/web/css/background-origin/index.html create mode 100644 files/ja/web/css/background-origin/index.md (limited to 'files/ja/web/css/background-origin') diff --git a/files/ja/web/css/background-origin/index.html b/files/ja/web/css/background-origin/index.html deleted file mode 100644 index 34ec2d7dee..0000000000 --- a/files/ja/web/css/background-origin/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: background-origin -slug: Web/CSS/background-origin -tags: - - Background - - CSS - - CSS プロパティ - - CSS 背景と境界 - - Reference - - background-origin -translation_of: Web/CSS/background-origin ---- -
{{CSSRef}}
- -

CSSbackground-origin プロパティは、背景配置領域を設定します。言い換えれば、 {{cssxref("background-image")}} プロパティで指定された画像の原点の位置を設定します。

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

{{cssxref("background-attachment")}} が fixed のときは background-origin が無視されることに注意してください。

- -
メモ: {{cssxref("background")}} 一括指定プロパティは、該当する値を設定しなかった場合、このプロパティの値を初期値にリセットします。
- -

構文

- -
/* キーワード値 */
-background-origin: border-box;
-background-origin: padding-box;
-background-origin: content-box;
-
-/* グローバル値 */
-background-origin: inherit;
-background-origin: initial;
-background-origin: unset;
-
- -

background-origin プロパティは、以下の一覧にあるキーワード値のうちの一つで指定します。

- -

- -
-
border-box
-
背景は境界ボックスからの相対位置になります。
-
padding-box
-
背景はパディングボックスからの相対位置になります。
-
content-box
-
背景はコンテンツボックスからの相対位置になります。
-
- -

形式文法

- -{{csssyntax}} - -

- -
.example {
-  border: 10px double;
-  padding: 10px;
-  background: url('image.jpg');
-  background-position: center left;
-  background-origin: content-box;
-}
-
- -
#example2 {
-  border: 4px solid black;
-  padding: 10px;
-  background: url('image.gif');
-  background-repeat: no-repeat;
-  background-origin: border-box;
-}
-
- -
div {
-  background-image: url('logo.jpg'), url('mainback.png'); /* 背景に二つの画像を適用 */
-  background-position: top right, 0px 0px;
-  background-origin: content-box, padding-box;
-}
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS3 Backgrounds', '#the-background-origin', 'background-origin')}}{{Spec2('CSS3 Backgrounds')}}初回定義
- -

{{cssinfo}}

- -

ブラウザーの対応

- -

{{Compat("css.properties.background-origin")}}

- -

関連情報

- - diff --git a/files/ja/web/css/background-origin/index.md b/files/ja/web/css/background-origin/index.md new file mode 100644 index 0000000000..34ec2d7dee --- /dev/null +++ b/files/ja/web/css/background-origin/index.md @@ -0,0 +1,110 @@ +--- +title: background-origin +slug: Web/CSS/background-origin +tags: + - Background + - CSS + - CSS プロパティ + - CSS 背景と境界 + - Reference + - background-origin +translation_of: Web/CSS/background-origin +--- +
{{CSSRef}}
+ +

CSSbackground-origin プロパティは、背景配置領域を設定します。言い換えれば、 {{cssxref("background-image")}} プロパティで指定された画像の原点の位置を設定します。

+ +
{{EmbedInteractiveExample("pages/css/background-origin.html")}}
+ + + +

{{cssxref("background-attachment")}} が fixed のときは background-origin が無視されることに注意してください。

+ +
メモ: {{cssxref("background")}} 一括指定プロパティは、該当する値を設定しなかった場合、このプロパティの値を初期値にリセットします。
+ +

構文

+ +
/* キーワード値 */
+background-origin: border-box;
+background-origin: padding-box;
+background-origin: content-box;
+
+/* グローバル値 */
+background-origin: inherit;
+background-origin: initial;
+background-origin: unset;
+
+ +

background-origin プロパティは、以下の一覧にあるキーワード値のうちの一つで指定します。

+ +

+ +
+
border-box
+
背景は境界ボックスからの相対位置になります。
+
padding-box
+
背景はパディングボックスからの相対位置になります。
+
content-box
+
背景はコンテンツボックスからの相対位置になります。
+
+ +

形式文法

+ +{{csssyntax}} + +

+ +
.example {
+  border: 10px double;
+  padding: 10px;
+  background: url('image.jpg');
+  background-position: center left;
+  background-origin: content-box;
+}
+
+ +
#example2 {
+  border: 4px solid black;
+  padding: 10px;
+  background: url('image.gif');
+  background-repeat: no-repeat;
+  background-origin: border-box;
+}
+
+ +
div {
+  background-image: url('logo.jpg'), url('mainback.png'); /* 背景に二つの画像を適用 */
+  background-position: top right, 0px 0px;
+  background-origin: content-box, padding-box;
+}
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Backgrounds', '#the-background-origin', 'background-origin')}}{{Spec2('CSS3 Backgrounds')}}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ +

{{Compat("css.properties.background-origin")}}

+ +

関連情報

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