1.写适配方案
<script>
var vw=window.innerWidth;
var rem=vw/10;
var root=document.querySelector('html');
root.style.fontSize=rem+"px"
window.onresize=function(){
var vw=window.innerWidth;
root.style.fontSize=vw/10+'px'
}
console.log(rem);
</script>
2.安装插件
px to rem