<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
html{
font-size: 50px;
}
/* html字体大小是16px */
.wrap{
font-size: 100px;
width: 1rem;/* 16px */ /* 50*1rem = 50px*/
height: 2rem;/* 32px */ /* 50*2rem = 100px */
background-color: red;
}
</style>
</head>
<body>
<!-- rem -- css3中的一个单位,相对单位,根【根元素】的字号大小进行计算的单位 -->
<div class="wrap"></div>
</body>
</html>