--- title: overscroll-behavior-y slug: Web/CSS/overscroll-behavior-y tags: - CSS - CSS Box Model - CSS Property - Reference - overscroll-behavior-y - 'recipe:css-property' translation_of: Web/CSS/overscroll-behavior-y --- <div>{{CSSRef}}</div> <p><span class="seoSummary"><strong><code>overscroll-behavior-y</code></strong> は CSS のプロパティで、スクロール領域の垂直方向の境界に達したときのブラウザーの挙動を設定します。</span></p> <p>全体的な説明は {{cssxref("overscroll-behavior")}} を参照してください。</p> <pre class="brush:css no-line-numbers notranslate">/* キーワード値 */ overscroll-behavior-y: auto; /* 既定値 */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* グローバル値 */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: unset; </pre> <h2 id="Syntax" name="Syntax">構文</h2> <p><code>overscroll-behavior-y</code> プロパティは、次の値の一覧のうち一つのキーワードで指定します。</p> <h3 id="Values" name="Values">値</h3> <dl> <dt><code>auto</code></dt> <dd>スクロールの末端における既定の振る舞いが通常通りに発生します。</dd> <dt><code>contain</code></dt> <dd>この値が設定された要素の内部では、スクロールの末端における既定の振る舞いが見られますが、隣接するスクロール領域に対するスクロール連鎖はありません。例えば、基底となる要素はスクロールしません。</dd> <dt><code>none</code></dt> <dd>隣接するスクロール領域に対するスクロール連鎖はなく、スクロールの末端における既定の振る舞いが抑制されます。</dd> </dl> <h2 id="Formal_definition" name="Formal_definition">公式定義</h2> <p>{{cssinfo}}</p> <h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2> {{csssyntax}} <h2 id="Examples" name="Examples">例</h2> <h3 id="Preventing_an_underlying_element_from_scrolling_vertically" name="Preventing_an_underlying_element_from_scrolling_vertically">背後にある要素の縦スクロールの抑止</h3> <pre class="brush: css notranslate">.messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } </pre> <p>完全な例と説明については、 {{cssxref("overscroll-behavior")}} を参照してください。</p> <h2 id="Specifications" name="Specifications">仕様書</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 Overscroll Behavior', '#propdef-overscroll-behavior-y', 'overscroll-behavior-y')}}</td> <td>{{Spec2('CSS Overscroll Behavior')}}</td> <td></td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> <p>{{Compat("css.properties.overscroll-behavior-y")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li><a href="https://developers.google.com/web/updates/2017/11/overscroll-behavior#demo">スクロールを制御する: 引いて更新や末端の効果のカスタマイズ</a></li> <li>The mapped logical properties: {{cssxref("overscroll-behavior-inline")}}, {{cssxref("overscroll-behavior-block")}}</li> </ul>