Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

工作上遇到的坑 | gauhar's blog #11

Open
GauharChan opened this issue Sep 5, 2019 · 0 comments
Open

工作上遇到的坑 | gauhar's blog #11

GauharChan opened this issue Sep 5, 2019 · 0 comments

Comments

@GauharChan
Copy link
Owner

https://gauhar.gitee.io/2019/09/05/%E5%B7%A5%E4%BD%9C%E4%B8%8A%E9%81%87%E5%88%B0%E7%9A%84%E5%9D%91/

抖音记录..搞错了,再来。博客,记录美好的坑,本文记录作者工作上遇到的坑。 自动滚动轮播浏览文章 后台返回文章数组,同时有一个动态秒数,需要在这个秒数内滚动读完一篇文章,并下一篇。 思路:渲染文章后,获取文档的高度 和 屏幕的高度,相减得到要滚动的高度,再用这个高度除动态秒数,得到一秒要移动的距离,通过定时器每秒重复移动滚动条。 坑:$('.content-box').html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant