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

Line 82: Line 82:
  
 
    var oHider=document.getElementById("hider");
 
    var oHider=document.getElementById("hider");
    oHider.style.left=document.body.clientWidth/2-250+"px";//居中
+
    oHider.style.left=document.body.clientWidth/2-250+"px";//居中 250是图片宽度一半
  
window.onscroll=function(){//滚动事件
+
window.onresize=function(){//屏幕变化事件  滚动事件由fixed解决
 
    var oHider=document.getElementById("hider");
 
    var oHider=document.getElementById("hider");
 
    oHider.style.left=document.body.clientWidth/2-250+"px";//居中
 
    oHider.style.left=document.body.clientWidth/2-250+"px";//居中

Revision as of 01:12, 22 September 2019

Copyright © 2019 iGEM UESTC-China
logo