rem
<!DOCTYPE html>
<html style="font-size: 100px">
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
<title></title>
<script>
var html = document.getElementsByTagName('html')[0];
var width = window.innerWidth;
var fontSize = 100/375*width;
html.style.fontSize = fontSize +'px';
window.onresize = function(){
var html = document.getElementsByTagName('html')[0];
var width = window.innerWidth;
var fontSize = 100/375 * width;
console.log(fontSize);
html.style.fontSize = fontSize +'px';
}
</script>
<style>
*{
margin: 0;
padding : 0;
}
.box{
width:100%;
}
.box div{
width:1.06rem;
height:0.5rem;
background: red;
float: left;
margin-right: 0.1rem;
}
</style>
</head>
<body>
<div class="box">
<div>
</div>
<div>
</div>
<div>
</div>
</div>
</body>
</html>