Difference between revisions of "Template:Tianjin/js/333"
Line 25: | Line 25: | ||
− | d3.style.width=(winWidth* | + | d3.style.width=(winWidth*1570/1920+"px"); |
d5.style.marginLeft=(winWidth*270/1920+"px"); | d5.style.marginLeft=(winWidth*270/1920+"px"); | ||
d4.style.marginLeft=(winWidth*270/1920+winWidth*1600/1920-100+"px"); | d4.style.marginLeft=(winWidth*270/1920+winWidth*1600/1920-100+"px"); | ||
− | $('.content div#content-in').css("width",(winWidth* | + | $('.content div#content-in').css("width",(winWidth*1560/1920+"px")); |
} | } | ||
window.onresize=WINget; | window.onresize=WINget; |
Latest revision as of 17:15, 16 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*1600/1920+"px"); d2.style.width=(winWidth*1570/1920-15+"px");
d3.style.width=(winWidth*1570/1920+"px"); d5.style.marginLeft=(winWidth*270/1920+"px"); d4.style.marginLeft=(winWidth*270/1920+winWidth*1600/1920-100+"px"); $('.content div#content-in').css("width",(winWidth*1560/1920+"px")); } window.onresize=WINget; window.onload=function(){ WINget(); }