(function(){
  function w() {
      var r = document.documentElement;
      var a = r.getBoundingClientRect().width;
      if (a > 750 ){
          a = 750;
      } 
      // 750/w = 100/font-size
      rem = a / 7.5;
      r.style.fontSize = rem + "px"
  }
  var t;
  let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
  if(flag) {
    // 移动端;
    w();
    window.addEventListener("resize", function() {
        clearTimeout(t);
        t = setTimeout(w, 300);
    }, false);
  }else {
    // pc端;
  }
  
})();
