只需一步,快速开始
Mr.Ra1n 发表于 2012-9-6 00:26 需要JQuery支持,懒得费事写,直接现扒的。 HTML:CSS:JS:
举报
<div id="Gotobottom" style="position:fixed;top:60px;right:10px;display:none;cursor:pointer;"><a title="bottom" onclick="window.scrollTo(0,0);return false;" href="#bottom" class="go-bottom">bottom</a><img src="/images/back-top.png"/></div> <script type="text/javascript"> idGotobottom=document.getElementById('Gotobottom'); idGotobottom.onclick=function (){ document.documentElement.scrollTop=0; sb(); } window.onscroll=sb; function sb(){ if(document.documentElement.scrollTop==0){ idBackTop.style.display="none"; }else{ idGotobottom.style.display="block"; } } </script>
Mr.Ra1n 发表于 2012-9-6 12:20 你那个一样有JS。
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|全球主机交流论坛
GMT+8, 2025-11-10 18:44 , Processed in 0.081349 second(s), 8 queries , Gzip On, MemCache On.
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.