レイアウト
スクロール領域の境界に達したときのブラウザの動作を制御するユーティリティ。
クラス | スタイル |
---|---|
overscroll-auto | overscroll-behavior: auto; |
overscroll-contain | overscroll-behavior: contain; |
overscroll-none | overscroll-behavior: none; |
overscroll-x-auto | overscroll-behavior-x: auto; |
overscroll-x-contain | overscroll-behavior-x: contain; |
overscroll-x-none | overscroll-behavior-x: none; |
overscroll-y-auto | overscroll-behavior-y: auto; |
overscroll-y-contain | overscroll-behavior-y: contain; |
overscroll-y-none | overscroll-behavior-y: none; |
ターゲット領域でのスクロールが親要素のスクロールをトリガーするのを防ぎつつ、コンテナの終端を超えてスクロールした際に「バウンス」効果を維持するには、overscroll-contain
ユーティリティを使用します(対応するOSの場合)。
スクロールして動作を確認
Well, let me tell you something, funny boy. Y'know that little stamp, the one that says "New York Public Library"? Well that may not mean anything to you, but that means a lot to me. One whole hell of a lot.
Sure, go ahead, laugh if you want to. I've seen your type before: Flashy, making the scene, flaunting convention. Yeah, I know what you're thinking. What's this guy making such a big stink about old library books? Well, let me give you a hint, junior.
Maybe we can live without libraries, people like you and me. Maybe. Sure, we're too old to change the world, but what about that kid, sitting down, opening a book, right now, in a branch at the local library and finding drawings of pee-pees and wee-wees on the Cat in the Hat and the Five Chinese Brothers? Doesn't HE deserve better?
<div class="overscroll-contain ...">Well, let me tell you something, ...</div>
ターゲット領域でのスクロールが親要素のスクロールをトリガーするのを防ぎ、コンテナの終端を超えてスクロールした際の「バウンス」効果も防止するには、overscroll-none
ユーティリティを使用します。
スクロールして動作を確認
Well, let me tell you something, funny boy. Y'know that little stamp, the one that says "New York Public Library"? Well that may not mean anything to you, but that means a lot to me. One whole hell of a lot.
Sure, go ahead, laugh if you want to. I've seen your type before: Flashy, making the scene, flaunting convention. Yeah, I know what you're thinking. What's this guy making such a big stink about old library books? Well, let me give you a hint, junior.
Maybe we can live without libraries, people like you and me. Maybe. Sure, we're too old to change the world, but what about that kid, sitting down, opening a book, right now, in a branch at the local library and finding drawings of pee-pees and wee-wees on the Cat in the Hat and the Five Chinese Brothers? Doesn't HE deserve better?
<div class="overscroll-none ...">Well, let me tell you something, ...</div>
ユーザーがプライマリスクロール領域の境界に達したときに、親スクロール領域のスクロールを続行できるようにするには、overscroll-auto
ユーティリティを使用します。
スクロールして動作を確認
Well, let me tell you something, funny boy. Y'know that little stamp, the one that says "New York Public Library"? Well that may not mean anything to you, but that means a lot to me. One whole hell of a lot.
Sure, go ahead, laugh if you want to. I've seen your type before: Flashy, making the scene, flaunting convention. Yeah, I know what you're thinking. What's this guy making such a big stink about old library books? Well, let me give you a hint, junior.
Maybe we can live without libraries, people like you and me. Maybe. Sure, we're too old to change the world, but what about that kid, sitting down, opening a book, right now, in a branch at the local library and finding drawings of pee-pees and wee-wees on the Cat in the Hat and the Five Chinese Brothers? Doesn't HE deserve better?
<div class="overscroll-auto ...">Well, let me tell you something, ...</div>
プレフィックスan overscroll-behavior
ユーティリティ のようなブレークポイントバリアント md:
を使用して、ユーティリティを適用するのはmedium 以上の画面サイズのみ
<div class="overscroll-auto md:overscroll-contain ..."> <!-- ... --></div>
バリアントの使用方法の詳細については、バリアントのドキュメントをご覧ください。