标签:
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
html {
font-size: 62.5%; /* sets the base font to 10px for easier math */
}
body {
font-size: 16px;
font-size: 1.6rem;
/*em是相对父元素的字体大小*/
/* sets the default sizing to make sure nothing is actually 10px */
}
h1 {
font-size: 32px;
font-size: 3.2rem;
}
</style>
</head>
<body>
测试font-size字体单位
</body>
</html>
===============================================================
<html>
<head>
<meta charset="UTF-8">
<title>单位</title>
<style>
.danwei {
border: 1px solid red;
/*height: 50vh;
width:50vw;*/
width: 50vmin;
height: 50vmax;
}
</style>
</head>
<body>
<div class=‘danwei‘></div>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/djawh/p/4554267.html