实现网页顺滑滚动(smooth scroll)的原生方式有四种:
1. html { scroll-behavior: smooth; }
2. window.scroll({ behavior: 'smooth' })
3. window.scrollBy({ behavior: 'smooth' })
4. elem.scrollIntoView({ behavior: 'smooth' })
demo 地址:
codepen.io
1. html { scroll-behavior: smooth; }
2. window.scroll({ behavior: 'smooth' })
3. window.scrollBy({ behavior: 'smooth' })
4. elem.scrollIntoView({ behavior: 'smooth' })
demo 地址:
展开
1
22
大数据-160 Apache Kylin Cube 实战:从建模到构建与查询(含踩坑与优化)