1.清样式,建自己的样式表 2.html,body{height: 100%;} 3.body{display: flex;flex-direction: column;} 4.写媒体查询,让heml的字体大小发生改变 320 321-375 376 5.确定像素比dpr 2 3 6.写标签,写布局 量出来的大小/dpr/html/的font-size
html,body{height: 100%; }
@media all and (max-width:320px){
/* */
html{font-size: 12px;
}
}
@media all and (min-width:321px) and (max-width:375px) {
html{
font-size: 14px;
}
}
@media all and (min-width:376px){
html{
font-size:16px;
}
}
body{
display: flex;flex-direction: column;
}