您当前的位置: 首页>专题专栏 > 涪陵区对外联系电话查询专栏
var haswap=false; /****判断屏幕大小更改网页缩放比例*/ function initScreen() { var viewport = document.querySelector("meta[name=viewport]"); if(!viewport){ $("head").append('') } if(!document.querySelector("meta[http-equiv]")){ $("head").append('') } var viewport = document.querySelector("meta[name=viewport]"); var winWidth = $(window).width(); var size = winWidth / 1200; if (winWidth < 480) { viewport.setAttribute('content', 'width=device-width, initial-scale=1.0, user-scalable=yes'); $("html").css({"transform":"scale("+size+")","transform-origin":"0 0",'width':'1200px','height':($("body").height()*size)+'px' }); } } $(function(){ if (haswap==false){ initScreen(); } });