rem_750
/* 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的更多相关文章
随机推荐
- 单机安装EFK(一)
官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-install.html#ge ...
- 17.3 删除没用的project
1.删除某一个或多个无用的project(历史project) 用十六进制编辑器打开"C:\Users\Baymax\Documents\Source Insight 4.0\Project ...
- [Mybatis]Mybatis 常用标签及功能整理
Mybatis中生成动态SQL的标签有四类,分别是: if choose (when, otherwise) trim (where, set) foreach 1.if 当需要动态生成where条件 ...
- RN 获取组件的宽度和高度
https://www.cnblogs.com/zhiyingzhou/p/7471212.html https://blog.csdn.net/calvin_zhou/article/details ...
- 使用R的注意事项
换源,将源切换到中国 具体方法是: options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/&qu ...
- c# 简单方便的连接oracle方式
通过nuget安装ManagedDataAccess (自动生成的config里面的配置都可以删掉) winform程序,拖出一个datagridview和button using Oracle.Ma ...
- iOS 自定义底部tabbar加号按钮实现方法
自定义UITabBar替换系统默认的,目的是为了在UITabBar中间位置添加一个“+号按钮” 1.自定义WBTabBar,让其继承自UITabBar,并定义点击事件代理方法. .h方法里面 #imp ...
- [UE4]Event Tick
一.每一帧都会触发Event Tick事件,“Delta Seconds”参数表示当前帧说花费的时间 二.因为各种原因(比如卡帧等),每一帧所花费的时间并不是相同的
- [UE4]修改瞬移操作方式,默认正前方
瞬移的时候,如果箭头指向正前方的角度跟中心线相差不大,则可以强制箭头指向中心线. 因为向量也可以表示方向,因此只要只要判断向量长度就是了,判断VectorLength值即可:
- 使用Gson解析复杂、变态的Json数据(包含中文key)
接口文档: app配置 接口 client/init 请求数据 json={"uid":"","sid":"",&quo ...