62

10行代码实现页面无限滚动

 6 years ago
source link: https://juejin.im/post/5ab8566f6fb9a028d66425d3
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.
背景: 由于网页的执行都是单线程的,在JS执行的过程中,页面会呈现阻塞状态。因此,如果JS处理的数据量过大,过程复杂,可能会造成页面的卡顿。传统的数据展现都以分页的形式,但是分页的效果并不好,需要用户手动点击下一页,才能看到更多的内容。有很多网站使用无限分页的

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK