missing file

This commit is contained in:
Admin
2022-01-06 03:25:11 +00:00
committed by Gitee
parent c0252fcb2d
commit 2c52684c1f
20 changed files with 2778 additions and 0 deletions

20
rc-busness/config/rem.js Normal file
View File

@@ -0,0 +1,20 @@
// 隔离作用域,避免全局变量的污染
!(function(){
function setHtmlFontSize(){
// 1.获取手机屏幕宽度
var w = document.documentElement.getBoundingClientRect().width; //如果用window.innerwidth的话改变窗口大小不能够及时获取窗口大小
// console.log(w);
// 2.根据屏幕宽度计算html font-size大小, 7.5指的是设计稿的宽度为750如果在公司中设计稿的尺寸为720那么应该除以7.2
var f = w/40;
// 3.设置html 的font-szie
document.documentElement.style.fontSize=f+"px";
}
setHtmlFontSize();
window.addEventListener("resize",function(){
// setTimeout 是为了解决在苹果手机上的闪屏情况
setTimeout(function(){
setHtmlFontSize();
},300)
})
})();