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的更多相关文章
随机推荐
- PlantUml 使用代码画各种图
资源 网址 官方github https://github.com/plantuml/plantuml 官方网站 http://plantuml.com/zh/ mac 下,webstorm 中使用 ...
- VS调试快捷键配置更改
VS进行调试时,默认情况下需按下Fn+F5等组合按键,手短的用起来很不便利 如何去掉组合键只按下F5? 解决:即按下Fn+Esc,然后就可以直接按下F1-F12使用VS的快捷键,如果想回到组合键也是同 ...
- GetPJData - uGetHttpData.pas
function GetPJData(APage: Integer): string; var IdHTTP: TIdHTTP; url: string; paramsList: TStringLis ...
- python中的RE模块
re模块(* * * * *) 就其本质而言,正则表达式(或 RE)是一种小型的.高度专业化的编程语言,(在Python中)它内嵌在Python中,并通过 re 模块实现.正则表达式模式被编译成一系列 ...
- postfix配置&使用
myorigin = $mydomain #以“user@example.com”(而不是“user@hostname.example.com”)发送邮件, #这样就没有理由将邮件发送到“user@h ...
- Livepeer中文白皮书(翻译)
Livepeer Whitepaper 分布式视频流媒体传输协议及经济激励 Doug Petkanics doug@livepeer.org Eric Tang eric@livepeer.org 翻 ...
- ReSharper 自动选中
想让智能提示默认选中第一个,步骤:ReSharper->Options->如下图
- 获取geometry边界范围的示例代码
根据sqlserver geometry数据定义获取空间类型边界范围 --获取指定街道边界的xy最大最小值 ) '--街道编码 create table #temp_point(id int iden ...
- ie浏览器许多图片放在一起会有间隙
解决方法一(推荐):设置图片父元素font-size:0. 解决方法二:设置图片为float:并且图片设为块级元素.
- 如何简单理解js中this的指向
前序 每个人学js都会被this指向这个东西搞得很蒙,那就是this的指向问题.首先,我们要明白 this的指向在函数定义的时候是确定不了的,只有函数执行的时候才能确定this到底指向谁,实际上thi ...