From 7552219a2b9c5a049cee4aa2a5f5bc6e97f6e30e Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 1 Feb 2022 22:49:44 +0900 Subject: CSS モーションパスのプロパティの記事を移行 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/offset/index.html | 120 ------------------------------------- files/ja/web/css/offset/index.md | 120 +++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 120 deletions(-) delete mode 100644 files/ja/web/css/offset/index.html create mode 100644 files/ja/web/css/offset/index.md (limited to 'files/ja/web/css/offset') diff --git a/files/ja/web/css/offset/index.html b/files/ja/web/css/offset/index.html deleted file mode 100644 index be1f419806..0000000000 --- a/files/ja/web/css/offset/index.html +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: offset -slug: Web/CSS/offset -tags: - - CSS - - CSS Motion Path - - CSS Property - - Experimental - - Reference - - 'recipe:css-shorthand-property' -translation_of: Web/CSS/offset ---- -

{{CSSRef}}

- -

offset は CSS の一括指定プロパティで、要素を定義された経路に沿って動かすのに必要なすべてのプロパティを設定します。

- -
-

: 仕様書の早期の版では、このプロパティを motion と呼んでいました。

-
- -

構成要素のプロパティ

- -

このプロパティは以下の CSS プロパティの一括指定です。

- - - -

構文

- -
/* オフセット位置 */
-offset: auto;
-offset: 10px 30px;
-offset: none;
-
-/* オフセット経路 */
-offset: ray(45deg closest-side);
-offset: path('M 100 100 L 300 100 L 200 300 z');
-offset: url(arc.svg);
-
-/* オフセット経路に距離と回転が加わったもの */
-offset: url(circle.svg) 100px;
-offset: url(circle.svg) 40%;
-offset: url(circle.svg) 30deg;
-offset: url(circle.svg) 50px 20deg;
-
-/* オフセットアンカーを含む */
-offset: ray(45deg closest-side) / 40px 20px;
-offset: url(arc.svg) 2cm / 0.5cm 3cm;
-offset: url(arc.svg) 30deg / 50px 100px;
-
- -

公式定義

- -

{{cssinfo}}

- -

形式文法

- -{{csssyntax}} - -

- -

経路に沿って要素を動かす

- -

HTML

- -
<div id="offsetElement"></div>
-
- -

CSS

- -
@keyframes move {
-  from {
-    offset-distance: 0%;
-  }
-
-  to {
-    offset-distance: 100%;
-  }
-}
-
-#offsetElement {
-  width: 50px;
-  height: 50px;
-  background-color: blue;
-  offset: path("M 100 100 L 300 100 L 200 300 z") auto;
-  animation: move 3s linear infinite;
-}
-
- -

結果

- -

{{EmbedLiveSample("Animating_an_element_along_a_path", 350, 350)}}

- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('Motion Path Level 1', '#offset-shorthand', 'offset')}}{{Spec2('Motion Path Level 1')}}初回定義
- -

ブラウザーの互換性

- -

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

diff --git a/files/ja/web/css/offset/index.md b/files/ja/web/css/offset/index.md new file mode 100644 index 0000000000..be1f419806 --- /dev/null +++ b/files/ja/web/css/offset/index.md @@ -0,0 +1,120 @@ +--- +title: offset +slug: Web/CSS/offset +tags: + - CSS + - CSS Motion Path + - CSS Property + - Experimental + - Reference + - 'recipe:css-shorthand-property' +translation_of: Web/CSS/offset +--- +

{{CSSRef}}

+ +

offset は CSS の一括指定プロパティで、要素を定義された経路に沿って動かすのに必要なすべてのプロパティを設定します。

+ +
+

: 仕様書の早期の版では、このプロパティを motion と呼んでいました。

+
+ +

構成要素のプロパティ

+ +

このプロパティは以下の CSS プロパティの一括指定です。

+ + + +

構文

+ +
/* オフセット位置 */
+offset: auto;
+offset: 10px 30px;
+offset: none;
+
+/* オフセット経路 */
+offset: ray(45deg closest-side);
+offset: path('M 100 100 L 300 100 L 200 300 z');
+offset: url(arc.svg);
+
+/* オフセット経路に距離と回転が加わったもの */
+offset: url(circle.svg) 100px;
+offset: url(circle.svg) 40%;
+offset: url(circle.svg) 30deg;
+offset: url(circle.svg) 50px 20deg;
+
+/* オフセットアンカーを含む */
+offset: ray(45deg closest-side) / 40px 20px;
+offset: url(arc.svg) 2cm / 0.5cm 3cm;
+offset: url(arc.svg) 30deg / 50px 100px;
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +{{csssyntax}} + +

+ +

経路に沿って要素を動かす

+ +

HTML

+ +
<div id="offsetElement"></div>
+
+ +

CSS

+ +
@keyframes move {
+  from {
+    offset-distance: 0%;
+  }
+
+  to {
+    offset-distance: 100%;
+  }
+}
+
+#offsetElement {
+  width: 50px;
+  height: 50px;
+  background-color: blue;
+  offset: path("M 100 100 L 300 100 L 200 300 z") auto;
+  animation: move 3s linear infinite;
+}
+
+ +

結果

+ +

{{EmbedLiveSample("Animating_an_element_along_a_path", 350, 350)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('Motion Path Level 1', '#offset-shorthand', 'offset')}}{{Spec2('Motion Path Level 1')}}初回定義
+ +

ブラウザーの互換性

+ +

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

-- cgit v1.2.3-54-g00ecf