From ab39a23e5f2b5e5f533637cbb5a5d4af90bb00a9 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 10 Oct 2021 22:28:00 +0900 Subject: CSS スクロールスナップ点の文書を更新準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ja/web/css/scroll-snap-destination/index.html | 146 --------------------- files/ja/web/css/scroll-snap-destination/index.md | 146 +++++++++++++++++++++ 2 files changed, 146 insertions(+), 146 deletions(-) delete mode 100644 files/ja/web/css/scroll-snap-destination/index.html create mode 100644 files/ja/web/css/scroll-snap-destination/index.md (limited to 'files/ja/web/css/scroll-snap-destination') diff --git a/files/ja/web/css/scroll-snap-destination/index.html b/files/ja/web/css/scroll-snap-destination/index.html deleted file mode 100644 index 98b8ccb23f..0000000000 --- a/files/ja/web/css/scroll-snap-destination/index.html +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: scroll-snap-destination -slug: Web/CSS/scroll-snap-destination -tags: - - CSS - - CSS スクロールスナップ - - CSS プロパティ - - Deprecated - - Reference -translation_of: Web/CSS/scroll-snap-destination ---- -
{{CSSRef}}{{deprecated_header}}
- -

CSSscroll-snap-destination プロパティは、スクロールコンテナーの視覚的な{{Glossary("viewport", "ビューポート")}}内の要素のスナップポイントが配置される X および Y 座標の位置を定義します。

- -
/* <position> 値 */
-scroll-snap-destination: 400px 600px;
-
-/* グローバル値 */
-scroll-snap-destination: inherit;
-scroll-snap-destination: initial;
-scroll-snap-destination: unset;
-
- -

{{cssinfo}}

- -

構文

- -

- -
-
<position>
-
スクロールコンテナーの視覚的なビューポートの先頭側の端からのスナップ距離のオフセットを指定します。最初の値はスナップ距離の X 座標、二番目の値は Y 座標です。
-
- -

形式文法

- -{{csssyntax}} - -

- -

HTML

- -
<div id="container">
-  <div>
-    <p>At coordinate (0, 0)</p>
-    <div class="scrollContainer destination0">
-      <div>1</div>
-      <div>2</div>
-      <div>3</div>
-    </div>
-  </div>
-
-  <div>
-    <p>At coordinate (25, 0)</p>
-    <div class="scrollContainer destination25">
-      <div>1</div>
-      <div>2</div>
-      <div>3</div>
-    </div>
-  </div>
-
-  <div>
-    <p>At coordinate (50, 0)</p>
-    <div class="scrollContainer destination50">
-      <div>1</div>
-      <div>2</div>
-      <div>3</div>
-    </div>
-  </div>
-</div>
-
- -

CSS

- -
#container {
-  display: flex;
-}
-
-#container > div:nth-child(-n+2) {
-  margin-right: 20px;
-}
-
-.scrollContainer {
-  width: 100px;
-  overflow: auto;
-  white-space: nowrap;
-  scroll-snap-points-x: repeat(100%);
-  scroll-snap-type: mandatory;
-  scroll-snap-destination: 20px 0;
-  font-size: 0;
-}
-
-.destination0 {
-  scroll-snap-destination: 0 0;
-}
-
-.destination25 {
-  scroll-snap-destination: 25px 0;
-}
-
-.destination50 {
-  scroll-snap-destination: 50px 0;
-}
-
-.scrollContainer > div {
-  width: 100px;
-  height: 100px;
-  display: inline-block;
-  line-height: 100px;
-  text-align: center;
-  font-size: 50px;
-}
-
-.scrollContainer > div:nth-child(even) {
-  background-color: #87EA87;
-}
-
-.scrollContainer > div:nth-child(odd) {
-  background-color: #87CCEA;
-}
- -
{{EmbedLiveSample("Example", "100%", "170")}}
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-snap-destination", "scroll-snap-destination")}}{{Spec2("CSS Scroll Snap Points")}}初回定義
- -

ブラウザーの対応

- -
{{Compat("css.properties.scroll-snap-destination")}}
diff --git a/files/ja/web/css/scroll-snap-destination/index.md b/files/ja/web/css/scroll-snap-destination/index.md new file mode 100644 index 0000000000..98b8ccb23f --- /dev/null +++ b/files/ja/web/css/scroll-snap-destination/index.md @@ -0,0 +1,146 @@ +--- +title: scroll-snap-destination +slug: Web/CSS/scroll-snap-destination +tags: + - CSS + - CSS スクロールスナップ + - CSS プロパティ + - Deprecated + - Reference +translation_of: Web/CSS/scroll-snap-destination +--- +
{{CSSRef}}{{deprecated_header}}
+ +

CSSscroll-snap-destination プロパティは、スクロールコンテナーの視覚的な{{Glossary("viewport", "ビューポート")}}内の要素のスナップポイントが配置される X および Y 座標の位置を定義します。

+ +
/* <position> 値 */
+scroll-snap-destination: 400px 600px;
+
+/* グローバル値 */
+scroll-snap-destination: inherit;
+scroll-snap-destination: initial;
+scroll-snap-destination: unset;
+
+ +

{{cssinfo}}

+ +

構文

+ +

+ +
+
<position>
+
スクロールコンテナーの視覚的なビューポートの先頭側の端からのスナップ距離のオフセットを指定します。最初の値はスナップ距離の X 座標、二番目の値は Y 座標です。
+
+ +

形式文法

+ +{{csssyntax}} + +

+ +

HTML

+ +
<div id="container">
+  <div>
+    <p>At coordinate (0, 0)</p>
+    <div class="scrollContainer destination0">
+      <div>1</div>
+      <div>2</div>
+      <div>3</div>
+    </div>
+  </div>
+
+  <div>
+    <p>At coordinate (25, 0)</p>
+    <div class="scrollContainer destination25">
+      <div>1</div>
+      <div>2</div>
+      <div>3</div>
+    </div>
+  </div>
+
+  <div>
+    <p>At coordinate (50, 0)</p>
+    <div class="scrollContainer destination50">
+      <div>1</div>
+      <div>2</div>
+      <div>3</div>
+    </div>
+  </div>
+</div>
+
+ +

CSS

+ +
#container {
+  display: flex;
+}
+
+#container > div:nth-child(-n+2) {
+  margin-right: 20px;
+}
+
+.scrollContainer {
+  width: 100px;
+  overflow: auto;
+  white-space: nowrap;
+  scroll-snap-points-x: repeat(100%);
+  scroll-snap-type: mandatory;
+  scroll-snap-destination: 20px 0;
+  font-size: 0;
+}
+
+.destination0 {
+  scroll-snap-destination: 0 0;
+}
+
+.destination25 {
+  scroll-snap-destination: 25px 0;
+}
+
+.destination50 {
+  scroll-snap-destination: 50px 0;
+}
+
+.scrollContainer > div {
+  width: 100px;
+  height: 100px;
+  display: inline-block;
+  line-height: 100px;
+  text-align: center;
+  font-size: 50px;
+}
+
+.scrollContainer > div:nth-child(even) {
+  background-color: #87EA87;
+}
+
+.scrollContainer > div:nth-child(odd) {
+  background-color: #87CCEA;
+}
+ +
{{EmbedLiveSample("Example", "100%", "170")}}
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-snap-destination", "scroll-snap-destination")}}{{Spec2("CSS Scroll Snap Points")}}初回定義
+ +

ブラウザーの対応

+ +
{{Compat("css.properties.scroll-snap-destination")}}
-- cgit v1.2.3-54-g00ecf