; (function (win, doc) {
  var resize = 'orientationchange' in window ? 'orientationchange' : 'resize'
  /* 使用rem 动态计算跟font-size值  */
  function resizeRoot() {
    var wWidth = (win.screen.width > 0)
      ? ((win.innerWidth >= win.screen.width || win.innerWidth === 0) ? win.screen.width : win.innerWidth)
      : win.innerWidth
    var wFsize = (wWidth > 640 ? 640 : wWidth) / 750 * 100
    doc.documentElement.style.fontSize = wFsize + 'px'
  }
  win.addEventListener(resize, resizeRoot, false)
  doc.addEventListener('DOMContentLoaded', resizeRoot, false)
})(window, document)
