$vw_fontsize_m: 75;
$vw_design_m: 750;
$vw_fontsize_pc: 136.6;
$vw_design_pc: 1366;
@function rem($px) {
@return ($px / $vw_fontsize ) * 1rem;
}
html{
@media screen and (max-width:750px) {
font-size: ($vw_fontsize_m / ($vw_design_m)/2) * 100vw;
}
@media screen and (max-width:1366px) {
font-size: ($vw_fontsize_pc / ($vw_design_pc)) * 100vw;
}
}
请教一下,rem()这个函数怎么动态改变$vw_fontsize,或则做这种需要兼容pc/移动自适应有什么好的办法吗