Home  >  Article  >  Web Front-end  >  点选TOP后并不是直接跳到页顶的,而是滚动上去_javascript技巧

点选TOP后并不是直接跳到页顶的,而是滚动上去_javascript技巧

WBOY
WBOYOriginal
2016-05-16 19:00:261020browse

demo中的p中的script改大或改小看看。。。移动到top的时间始终是一定的,你也可以设置一个阀值,在页面高度到达这个阀值之前,移动的总时间是多少,当页面高度超过这个数时,移动的总时间反而以一定比例减小,自己试试看吧...

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn