1 function rems(doc: any, win: any): void {
2 let docEl = doc.documentElement,
3 resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
4 recalc = function () {
5 let clientWidth = docEl.clientWidth;
6 if (!clientWidth) return;
7 docEl.style.fontSize = 20 * (clientWidth / 750) + 'px';
8 };
9 if (!doc.addEventListener) return;
10 win.addEventListener(resizeEvt, recalc, false);
11 doc.addEventListener('DOMContentLoaded', recalc, false);
12 }
13 export default {
14 return : rems(document,window)
15 }

最新文章

  1. Lua 安全调用 metatable 的简单应用
  2. 爬虫 htmlUnit遇到Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.dnsResolve错误
  3. 20145330第十周《Java学习笔记》
  4. JavaScript tasks, microtasks, queues and schedules
  5. Core Java Volume I — 4.4. Static Fields and Methods
  6. jQuery骨架
  7. mfc简易加法
  8. Qt之QComboBox定制(二)
  9. Pycharm汉化
  10. 限时订单实现方案(DelayQueue、ActiveMq)
  11. python中的optionParser模块
  12. 渗透测试(theharvester >>steghide)
  13. 《Effective C++》笔记
  14. 使用SonarCloud对.NET Core项目进行静态代码分析
  15. SpringBoot集成RocketMQ
  16. 奇怪吸引子---LorenzStenflo
  17. hdoj:题目分类
  18. VBA:Excel使用SQL进行查询
  19. Notes of Daily Scrum Meeting(11.4)
  20. IOS TableView滑动不灵敏问题

热门文章

  1. Vue 利用后端的数据字典和Map对象实现表格列字段动态转义的处理方案
  2. ABP Framework V4.4 RC 新增功能介绍
  3. 开发小技巧之:unicode的排序和正则匹配
  4. 66.QT-线程并发、QTcpServer并发、QThreadPool线程池
  5. 深入学习Netty(2)——传统NIO编程
  6. layui 修改表格边框颜色
  7. POJ 2065 SETI 高斯消元解线性同余方程
  8. hdu 2159 二维完全背包
  9. namenode和datanode启动失败
  10. 小程序textarea设置maxlength后不是你想的那样简单