[Javascript] 平滑捲動至元素: smoothscroll

seamless-scroll-polyfill

https://github.com/magic-akari/seamless-scroll-polyfill


scrollIntoView

https://developer.mozilla.org/zh-CN/docs/Web/API/Element/scrollIntoView


seamless-scroll-polyfill是針對DOM元素的scrollIntoView所提供的polyfill,簡單容易使用,使scrollIntoView能用於IE11。另一款smoothscroll目前已不更新,且於IE時無法支援多層捲動。



#smoothscroll, scrollIntoView


留言