3 回答

TA貢獻(xiàn)4條經(jīng)驗(yàn) 獲得超4個(gè)贊
html { font-size: 20px; height:100%; width:100%;}
@media only screen and (min-width: 400px) { html { font-size: 21.33333333px !important; }}
@media only screen and (min-width: 414px) { html { font-size: 22.08px !important; }}
@media only screen and (min-width: 480px) { html { font-size: 25.6px !important; }}

TA貢獻(xiàn)8條經(jīng)驗(yàn) 獲得超1個(gè)贊
?!new?function(){var?a=this;a.width=750,a.fontSize=100,a.widthProportion=function(){var?b=(document.body&&document.body.clientWidth||document.getElementsByTagName("html")[0].offsetWidth)/a.width;return?b>1?1:b},a.changePage=function(){document.getElementsByTagName("html")[0].setAttribute("style","font-size:"+a.widthProportion()*a.fontSize+"px?!important")},a.changePage(),window.addEventListener("resize",function(){a.changePage()},!1)};
引入這段js,設(shè)計(jì)圖的750px?= 7.5rem
添加回答
舉報(bào)