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

(Created page with "function WINget(){ if (window.innerWidth) winWidth = window.innerWidth; else if ((document.body) && (document.body.clientWidth)) ...")
 
Line 1: Line 1:
function WINget(){
+
function WINget(){
 
if (window.innerWidth)
 
if (window.innerWidth)
 
                   winWidth = window.innerWidth;
 
                   winWidth = window.innerWidth;
Line 20: Line 20:
 
         d3=document.getElementById('content-in');
 
         d3=document.getElementById('content-in');
 
            
 
            
             d1.style.width=(winWidth*1200/1920+"px");
+
             d1.style.width=(winWidth*1440/1920+"px");
             d2.style.width=(winWidth*1160/1920-15+"px");
+
             d2.style.width=(winWidth*1392/1920-15+"px");
  
             d3.style.width=(winWidth*1133/1920+"px");
+
 
 +
 
 +
             d3.style.width=(winWidth*1360/1920+"px");
 
    
 
    
             d5.style.marginLeft=(winWidth*355/1920+"px");
+
             d5.style.marginLeft=(winWidth*230/1920+"px");
             d4.style.marginLeft=(winWidth*355/1920+winWidth*1200/1920-100+"px");
+
             d4.style.marginLeft=(winWidth*230/1920+winWidth*1440/1920-100+"px");
 
     }
 
     }
 
       window.onresize=WINget;
 
       window.onresize=WINget;

Revision as of 10:43, 8 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*1392/1920-15+"px");


           d3.style.width=(winWidth*1360/1920+"px");
 
           d5.style.marginLeft=(winWidth*230/1920+"px");
           d4.style.marginLeft=(winWidth*230/1920+winWidth*1440/1920-100+"px");
   }
      window.onresize=WINget;
   window.onload=function(){
       WINget();
   }