如果手机用的是iPhone6plus了,这么办?那这个适配要怎么改?
@function px2rem($px){
$rem : 37.5px;
@return ($px / $rem) + rem;
}//获取视窗宽度
let htmlWidth = document.documentElement.clientWidth || document.body.scrollWidth;
console.log(htmlWidth);
//获取视窗高度
let htmlDom = document.getElementsByTagName('html')[0];
htmlDom.style.fontSize = htmlWidth / 10 + 'px';