Difference between revisions of "Template:UESTC-China/footer"

Line 82: Line 82:
  
 
    var oHider=document.getElementById("hider");
 
    var oHider=document.getElementById("hider");
    var scroll=document.body.scrollTop || document.documentElement.scrollTop;
+
    oHider.style.left=document.body.clientWidth/2-250+"px";//居中
+
    oHider.style.top=scroll+"px"; //这里是定义的行间的top
+
    oHider.style.left=document.body.clientWidth/3+"px";//居中
+
  
 
window.onscroll=function(){//滚动事件
 
window.onscroll=function(){//滚动事件
 
    var oHider=document.getElementById("hider");
 
    var oHider=document.getElementById("hider");
    var scroll=document.body.scrollTop || document.documentElement.scrollTop;
+
    oHider.style.left=document.body.clientWidth/2-250+"px";//居中
+
    oHider.style.top=scroll+"px"; //这里是定义的行间的top
+
    oHider.style.left=document.body.clientWidth/3+"px";//居中
+
 
}
 
}
 
</script>
 
</script>
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 00:54, 22 September 2019

Copyright © 2019 iGEM UESTC-China
logo