css3 @media结合rem布局(邹文丰)

<!DOCTYPE html>
<html lang="en">
<head>
<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">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Title</title>
<style>
html{
font-size: 625%; /*100 ÷ 16 × 100% = 625%*/
}
@media screen and (min-360px) and (max-374px) and (orientation:portrait) {
html { font-size: 703%; }
}
@media screen and (min-375px) and (max-383px) and (orientation:portrait) {
html { font-size: 732.4%; }
}
@media screen and (min-384px) and (max-399px) and (orientation:portrait) {
html { font-size: 750%; }
}
@media screen and (min-400px) and (max-413px) and (orientation:portrait) {
html { font-size: 781.25%; }
}
@media screen and (min-414px) and (max-431px) and (orientation:portrait){
html { font-size: 808.6%; }
}
@media screen and (min-432px) and (max-479px) and (orientation:portrait){
html { font-size: 843.75%; }
}

*{
padding: 0;
margin:0;
}
.header{
text-align: center;
height: 0.5rem;
100%;
background-color: #00b793;
font-size: 0.18rem;
line-height:0.5rem;
}
</style>
</head>
<body>
<div class="header">
<span>杭州有数金融信息服务有限公司</span>
</div>
<div class="content"></div>
<div class="footer"></div>
</body>
</html>
原文地址:https://www.cnblogs.com/zou1234/p/8857846.html