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的更多相关文章
随机推荐
- 18.12 SDRAM和NAND FLASH区别
处理器运行时要做大量的数据计算和交换,要求内存读写速度很快. NOR Flash读取快,写入慢,总线结构,能运行代码,价格贵. NAND Flash读取慢,写入快,非总线结构,不能运行代码,价格便宜. ...
- 多次ajax请求数据json出错!!
问题描述: 1.对象数据存放在session中,每次从session中取数据 2.jsp初始化完毕调用ajax请求,返回的数据格式出错(返回部分数据,即丢失了部分数据) 解决方案:
- mongodb url
https://blog.csdn.net/jianlong727/article/details/53484440
- Windos下pip配置豆瓣源
C:\Users\liche\pip 下创建pip.ini文件 pip.ini [global] index-url = http://pypi.douban.com/simple [install] ...
- windows下的拷贝利器robocopy
robocopy xxcopy http://www.cnblogs.com/zhanglei1371/p/6724167.html [转载]robocopy的用法 经常进行文件管理操作的朋友们,不满 ...
- Unity Shader Graph(三)Phase In and Out
软件环境 Unity 2018.1.6f1 Lightweight Render Pipeline 1.1.11-preview Phase In and Out效果预览 角色沿Y轴逐渐出现和消失 S ...
- Redhat Linux 配置Xmanager
1. vi /etc/inittab id:5:initdefault: //设置系统运行级为5,如果本来就是5就无需修改 id:5:respawn:/usr/sbin/gdm //添加到最后 ...
- FIFO使用技巧
FPGA中,经常会用到FIFO来缓冲数据或者跨时钟传递数据. 1.Almost full & Almost empty 作为初学者,最开始使用FIFO的时候,对于它的理解,无非是配置好位宽.深 ...
- Java笔记Spring(九)
完整调试springmvc源码 WebApplicationContext = new XmlWebApplicationContext();// XmlWebApplicationContext通过 ...
- 创建自定义的 Angular Schematics
本文对 Angular Schematics 进行了介绍,并创建了一个用于创建自定义 Component 的 Schematics ,然后在 Angular 项目中以它为模板演练了通过 Schemat ...