移动端初始化页面


;(function(){
var iScale = 1,viewW = 0;
iScale = iScale/window.devicePixelRatio;
document.write('<meta name="viewport" content="width=device-width,initial-scale=' + iScale + ',minimum-scale=' + iScale + ',maximum-scale=' + iScale + ',user-scalable=no" />');
viewW = document.documentElement.clientWidth;
viewW = viewW > 1640 ? 1640 : viewW;
document.getElementsByTagName('html')[0].style.fontSize = viewW / 16 + 'px';
})(window);

posted @ 2015-12-07 15:23  Jerry24  阅读(272)  评论(0编辑  收藏  举报