Scroll-into-view-if-needed
scroll-init-view-if-needed
Element.scrollIntoView ponyfills for things like "if-needed" and "smooth".
This is a ponyfill for Element.scrollIntoViewIfNeeded
. Since then the CSS working group have decided to implement its features in Element.scrollIntoView
as the option scrollMode: "if-needed"
. Thus this library got rewritten to implement that spec instead of the soon to be deprecated one.
Don't miss the Demo.
Get it: npm install scroll-into-view-if-needed
Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
GIF FTW!