From f29c1e5bbfb2590b04267bf88b5becf20af18bc5 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 10 Oct 2021 23:56:53 +0900 Subject: CSS スクロールスナップの文書の変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/scroll-padding/index.md | 86 ++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 files/ja/web/css/scroll-padding/index.md (limited to 'files/ja/web/css/scroll-padding/index.md') diff --git a/files/ja/web/css/scroll-padding/index.md b/files/ja/web/css/scroll-padding/index.md new file mode 100644 index 0000000000..5de5104bbb --- /dev/null +++ b/files/ja/web/css/scroll-padding/index.md @@ -0,0 +1,86 @@ +--- +title: scroll-padding +slug: Web/CSS/scroll-padding +tags: + - CSS + - CSS Property + - 'recipe:css-shorthand-property' + - scroll-snap +translation_of: Web/CSS/scroll-padding +--- +
{{CSSRef}}
+ +

scroll-padding一括指定プロパティで、要素のすべての辺にに一度にスクロールパディングを設定します。 {{cssxref("padding")}} プロパティで要素のパディングを設定するのとよく似ています。

+ +
{{EmbedInteractiveExample("pages/css/scroll-padding.html")}}
+ + + +

scroll-padding-* プロパティは、スクロールポートの最適な表示領域のオフセットを定義します。これにより、スクロールポートの中で他のコンテンツ (固定配置されたツールバーやサイドバーなど) に隠れてしまう領域を除外したり、ターゲット要素とスクロールポートの縁の間に余裕を持たせたりすることができます。

+ +

構成するプロパティ

+ +

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

+ + + +

構文

+ +
/* キーワード値 */
+scroll-padding: auto;
+
+/* <length> 値 */
+scroll-padding: 10px;
+scroll-padding: 1em .5em 1em 1em;
+scroll-padding: 10%;
+
+/* グローバル値 */
+scroll-padding: inherit;
+scroll-padding: initial;
+scroll-padding: unset;
+
+ +

+ +
+
{{cssxref("<length-percentage>")}}
+
スクロールポートの対応する縁からの内側へのオフセットを、有効な {{cssxref("<length>")}} または {{cssxref("<percentage>")}} として指定します。
+
auto
+
オフセットがユーザーエージェントによって決定されます。これは一般的には 0px になりますが、ゼロ以外の値がより適切であれば、ユーザエージェントは自由に検出して他の値を取ることができます。
+
+ +

公式定義

+ +

{{CSSInfo}}

+ +

形式文法

+ +{{csssyntax}} + +

仕様書

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

ブラウザーの互換性

+ +

{{Compat("css.properties.scroll-padding")}}

-- cgit v1.2.3-54-g00ecf