js实现返回顶部
<span style="position: fixed;width: 50px;height: 50px;border-radius: 50%;text-align: center;line-height: 50px;bottom: 50px;right: 50px;background: #fff;box-shadow: 1px 1px 10px #bbb;font-weight: 600;font-size: 18px;cursor: pointer;" onclick="timer = setInterval(() => document.documentElement.scrollTop <= 0 ? clearInterval(timer) : window.scrollTo(0, document.documentElement.scrollTop - 100), 17);">TOP</span>