<script>
|
function goTopEx(){
|
var obj=document.getElementById("goTopBtn");
|
function getScrollTop(){
|
return document.documentElement.scrollTop;
|
}
|
function setScrollTop(value){
|
document.documentElement.scrollTop=value;
|
}
|
window.onscroll=function(){getScrollTop()>0?obj.style.display="":obj.style.display="none";}
|
obj.onclick=function(){
|
var goTop=setInterval(scrollMove,10);
|
function scrollMove(){
|
setScrollTop(getScrollTop()/1.1);
|
if(getScrollTop()<1)clearInterval(goTop);
|
}
|
}
|
}
|
</script>
|
<div class="clear"></div>
|
<div id="goTopBtn" class="png none" ><img border=0 src="{yun:}$style{/yun}/images/lanren_top.png" class="png"></div>
|
<script type=text/javascript>goTopEx();</script>
|
<style>
|
#goTopBtn {
|
POSITION: fixed;
|
TEXT-ALIGN: center;
|
WIDTH: 47px;
|
BOTTOM:3px;
|
HEIGHT: 78px;
|
FONT-SIZE: 12px;
|
CURSOR: pointer;
|
RIGHT: 40px;
|
_position: absolute;
|
_right: 40;
|
_position:absolute;
|
_bottom:auto;
|
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||15)-(parseInt(this.currentStyle.marginBottom,10)||15)));
|
_background:url({yun:}$style{/yun}/images/lanren_top.png) no-repeat
|
}
|
*html{
|
background-image:url(about:blank);
|
background-attachment:fixed;
|
}
|
</style>
|