<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
<title>无标题文档</title>
<style>
*{
    padding:0;
    margin:0;
}
body{
    background:#000;
}
div{
    width:6.4rem;
    height:5rem;
    margin:0 auto;
    line-height:5rem;
    font-size:.3rem;
    text-align:center;
    color:#fff;
    background:red;
}
</style>
</head>

<body>
<div>我是测试的</div>
<script>
;!function(top){
    var doc=top.document;
    top.SetSize=function(width){
        this.obj=doc.querySelector('html');
        this.width=width;
        this.fontSize=100;
        this.init().resize();
    };
    SetSize.prototype={
        init:function(){
            this.scale=this.obj.clientWidth/this.width;
            this.obj.setAttribute("style","font-size:"+(this.scale*this.fontSize)+"px !important");
            return this;
        },
        resize:function(){
            top.addEventListener('resize',this.init.bind(this),false);
        }
    };
    SetSize.prototype.constructor=SetSize;
    doc.addEventListener('DOMContentLoaded',function(){
        new SetSize(640);
    },false);
}(parent);
</script>
</body>
</html>

最新文章

  1. 用RMAN备份EBS数据库的脚本
  2. hadoop中MapReduce多种join实现实例分析
  3. Java学习随笔1:Java是值传递还是引用传递?
  4. HDU 2065 “红色病毒”问题 --指数型母函数
  5. Mysql查询比较
  6. 【Linux高频命令专题(14)】nl
  7. hdu-4833-Best-Financing(DP)
  8. object类和内部类
  9. jQuery的each使用陷阱
  10. python基础之 列表,元组,字典
  11. 06:合法 C 标识符
  12. 二分插入、bisect
  13. python的_thread模块来实现多线程(&lt;python核心编程例子&gt;)
  14. nginx-port-Permission-denied
  15. Angular简介与程序架构
  16. [Auto Testing] 工具准备:Selenium 与 ChromeDriver
  17. 前端项目中使用git来做分支和合并分支,管理生产版本
  18. MVC3 ajax功能
  19. 系统编程--标准IO
  20. 51nod_1255字典序最小的子序列

热门文章

  1. SQL语句の集锦
  2. zip file 压缩文件
  3. Automated Telephone Exchange
  4. GIT,VAGRANT及COREOS
  5. 从相对路径说开来(从C++到Qt)
  6. 把消息送到默认窗口函数里,并非一点用都没有,可能会产生新的消息(以WM_WINDOWPOSCHANGED为例)
  7. 在浏览器控制台调试php程序
  8. 数据结构(Splay平衡树): [NOI2007] 项链工厂
  9. interview material
  10. Contains Duplicate III —— LeetCode