// $(window).resize(function (){
//     let designSize = 1920; // 设计图尺寸
//     let html = document.documentElement;
//     let wW = html.clientWidth;// 窗口宽度
//     let rem = wW * 100 / designSize;
    // if (wW < 1200) {
    //     wW = 1200
    // }
//     document.documentElement.style.fontSize = rem + 'px';

//     console.log('wW_______________________________________________',wW)
// });

(function(doc, win) {
    var docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = function() {
            var clientWidth = docEl.clientWidth;
            if (!clientWidth) return;

            if (clientWidth < 1200) {
                clientWidth = 1200;
            }
            docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';
        };

    if (!doc.addEventListener) return;
    win.addEventListener(resizeEvt, recalc, false);
    doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
