分辨率兼容

 //分辨率兼容
    ;(function(win,doc){
        var rem = 40/750*doc.documentElement.clientWidth;
        doc.documentElement.style.fontSize=rem+'px';
        win.addEventListener('resize',function(){
            var rem = 40/750*doc.documentElement.clientWidth;
            doc.documentElement.style.fontSize = rem+'px';
        },false)
    })(window,document);

猜你喜欢

转载自www.cnblogs.com/liubingyjui/p/10394730.html