aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/scroll-margin-top/index.html
blob: a79d19eb9303ef4737563bf5882ea071502225e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: scroll-margin-top
slug: Web/CSS/scroll-margin-top
tags:
  - CSS
  - CSS Property
  - CodingScripting
  - Reference
  - Web
  - scroll-margin
  - scroll-margin-top
translation_of: Web/CSS/scroll-margin-top
---
<div>{{CSSRef}}</div>

<p><code>scroll-margin-top</code> プロパティは、スクロールスナップ領域の上側のマージンを定義し、このボックスをスナップポートにスナップするために使用されます。スクロールスナップ領域は変換された境界ボックスによって定義され、四角形の囲みボックスを探して (スクロールコンテナーの座標空間における軸に合わせられ)、それから指定された外部距離が追加されます。</p>

<div>{{EmbedInteractiveExample("pages/css/scroll-margin-top.html")}}</div>

<p class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</p>

<p>{{cssinfo}}</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="brush: css">/* &lt;length&gt; 値 */
scroll-margin-top: 10px;
scroll-margin-top: 1em;

/* グローバル値 */
scroll-margin-top: inherit;
scroll-margin-top: initial;
scroll-margin-top: unset;
</pre>

<h3 id="Values" name="Values"></h3>

<dl>
 <dt><code><var>&lt;length&gt;</var></code></dt>
 <dd>スクロールコンテナーの上側の辺からみた外部の距離です。</dd>
</dl>

<h3 id="Formal_syntax" name="Formal_syntax">形式文法</h3>

<pre class="syntaxbox">{{csssyntax}}</pre>

<h2 id="Specification" name="Specification">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-margin-top", "scroll-margin-top")}}</td>
   <td>{{Spec2("CSS Scroll Snap Points")}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>

<p class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</p>

<p>{{Compat("css.properties.scroll-margin-top")}}</p>