You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@media screen and (max-width:321px) {
body {
font-size:16px
}
}
@media screen and (min-width:321px) and (max-width:400px) {
body {
font-size:17px
}
}
@media screen and (min-width:400px) {
body {
font-size:19px
}
}
rem 方案
无它,根元素的字体大小(根元素字体大小为
1rem
)。设置
rem
与设计稿px
的换算比例:1 rem = 100 px
,这样设计稿上的1px
就可以写成0.01 rem
了。但是,字体一般还是保持固定大小,不缩放,所以一般使用媒体查询,比如:
vw 方案
比较复杂,见:https://www.w3cplus.com/mobile/vw-layout-in-vue.html
The text was updated successfully, but these errors were encountered: