/* fix the code flash the page  */
var globalWidth = document.documentElement.clientWidth;//window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var radixNO = 100/750*globalWidth;
document.documentElement.style.fontSize = radixNO + 'px';
/* fit document fit the screen, get the radix */
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var globalWidth = window.innerWidth;// for judge the screen ??
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);

rem_750的更多相关文章

随机推荐

  1. 左耳听风-ARTS-第2周(2019/3/31-2019/4/6)

    Algorithm 验证括号题(https://leetcode.com/problems/valid-parentheses/).这道题在极客时间上覃超的<算法面试通关40讲>(http ...

  2. npm run dev--The 'mode' option has not been set, webpack will fallback to 'production' for this value

    npm run dev时报警告: warning configurationThe 'mode' option has not been set, webpack will fallback to ' ...

  3. C/C++常见错误

    1.段错误 段错误:指的是访问了不可访问的内容,内存要么是不存在的,要么是受到系统保护的. 如:1.释放了不存在的内存(堆内存) ; free a; 2.代码被重复定义了 往往是由于头文件被重复定义了 ...

  4. Internet Explorer 安全区域注册表项说明

    引用网址:http://support.microsoft.com/kb/182569/zh-cnInternet Explorer 安全区域设置存储在以下注册表子项下面: HKEY_LOCAL_MA ...

  5. azkaban执行错误 Job failed, Cannot request memory (Xms 0 kb, Xmx 0 kb) from system for job

    azkaban默认需要3G的内存,剩余内存不足则会报异常. 配置文件,设置 azkaban-web-server-2.7.0/plugins/jobtypes/commonprivate.proper ...

  6. dubbo 用来做什么

    1.各个独立app之间的通信问题怎么解决? 2.怎么做到统一调度.协调处理. 3.如果计费模块是并发最大的模块,但是其他模块并发不是很大.则需要对计费进行负载均衡,怎么实现?

  7. 2018-2019-2 20175311 实验二 《Java开发环境的熟悉》实验报告

    2018-2019-2 20175303 实验二 <Java开发环境的熟悉>实验报告 一.实验准备 1.了解掌握实验所要用到的三种代码 伪代码 产品代码 测试代码 2.IDEA中配置单元测 ...

  8. vim的基础操作

       

  9. 基于ssd的手势识别模型(object detection api方式)

    [Tensorflow]Object Detection API-训练自己的手势识别模型 1. 安装tensorflow以及下载object detection api 1.安装tensorflow: ...

  10. 总结:Java 集合进阶精讲2-ArrayList

    知识点:Java 集合框架图 总结:Java 集合进阶精讲1 总结:Java 集合进阶精讲2-ArrayList 初探: ArrayList底层结构是数组,是List接口的 可变数组的实现,所以会占用 ...