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-width:360px) and (max-width:374px) and (orientation:portrait) {
html { font-size: 703%; }
}
@media screen and (min-width:375px) and (max-width:383px) and (orientation:portrait) {
html { font-size: 732.4%; }
}
@media screen and (min-width:384px) and (max-width:399px) and (orientation:portrait) {
html { font-size: 750%; }
}
@media screen and (min-width:400px) and (max-width:413px) and (orientation:portrait) {
html { font-size: 781.25%; }
}
@media screen and (min-width:414px) and (max-width:431px) and (orientation:portrait){
html { font-size: 808.6%; }
}
@media screen and (min-width:432px) and (max-width:479px) and (orientation:portrait){
html { font-size: 843.75%; }
}

*{
padding: 0;
margin:0;
}
.header{
text-align: center;
height: 0.5rem;
width: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>
posted @ 2018-04-16 18:59  zou1234  阅读(522)  评论(0编辑  收藏  举报