Difference between revisions of "Template:Tianjin/js/222"

Line 30: Line 30:
 
             d4.style.marginLeft=(winWidth*230/1920+winWidth*1440/1920-100+"px");
 
             d4.style.marginLeft=(winWidth*230/1920+winWidth*1440/1920-100+"px");
 
             $('.content div#content-in').css("width",(winWidth*1400/1920+"px"));
 
             $('.content div#content-in').css("width",(winWidth*1400/1920+"px"));
 +
            console.log("onload!");
 
     }
 
     }
 
       window.onresize=WINget;
 
       window.onresize=WINget;

Revision as of 15:59, 15 September 2015

function WINget(){ if (window.innerWidth)

                  winWidth = window.innerWidth;
            else if ((document.body) && (document.body.clientWidth))
                  winWidth = document.body.clientWidth;
            if (window.innerHeight)
                  winHeight = window.innerHeight;
            else if ((document.body) && (document.body.clientHeight))
                  winHeight = document.body.clientHeight;
            if (document.documentElement  && document.documentElement.clientHeight && document.documentElement.clientWidth)
            {
                winHeight = document.documentElement.clientHeight;
                winWidth = document.documentElement.clientWidth;
  			}
        var d1=document.getElementById('content-back1'),
        	 d2=document.getElementById('content1'),
        	 d4=document.getElementById('left1'),
        	 d5=document.getElementById('right1'),
        	 d3=document.getElementById('content-in');
       	  
           d1.style.width=(winWidth*1440/1920+"px");
           d2.style.width=(winWidth*1405/1920-15+"px");


           d3.style.width=(winWidth*1400/1920+"px");
 
           d5.style.marginLeft=(winWidth*230/1920+"px");
           d4.style.marginLeft=(winWidth*230/1920+winWidth*1440/1920-100+"px");
           $('.content div#content-in').css("width",(winWidth*1400/1920+"px"));
           console.log("onload!");
   }
      window.onresize=WINget;
   window.onload=function(){
       WINget();
   }