4

CSS Tip: What is Scroll Chaining?

 3 years ago
source link: https://dev.to/jyotishman/css-tip-what-is-scroll-chaining-167m
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
CSS Tip: What is Scroll Chaining?

Did you ever experienced this behaviour when the parent container starts scrolling once the child scroller reached its full extent .

If you're a victim of this problem anytime than you might have used CSS property overflow-y: hidden on the parent container or might have used position: fixed

You don't need to use such hacks anymore. There is a CSS property to control such overflow effects. Just apply overscroll-behavior on the body to prevent it from happening anywhere.

body {
overscroll-behavior: contain; /* or "none" */
}

For more such content, follow me on twitter -
username- frontend_jsx

unknown tweet media contentPlay butt

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK