移动端架构搭建:
padding: 0;
margin: 0;
box-sizing: border-box;
}
html,body{
height: 100%;
}
@media all and (min-width:320px) and (max-width:375px){
html{
font-size: 100px;
}
}
@media all and (min-width:375px) and (max-width:414px){
html{
font-size: 117px;
}
}
body{
display: flex;
flex-direction: column;
}
header,footer{
height: 0.45rem;
background-color: red;
}
main{
flex: 1;
background-color: royalblue;
overflow: auto;
}
新手发布,不喜勿喷,望各位大神斧正