


// 基准大小
const baseSize = 16

// 设置 rem
function setRem () {
  let scale = document.documentElement.clientWidth / 1920
  scale = scale >= 0.875 ? scale : 0.875
  document.documentElement.style.fontSize = baseSize * Math.min(scale, 1.125) + 'px'
}

// 初始化
setRem()

window.onresize = function () {
  setRem()
}