标题:设备像素比 出处:刘新修 时间:Tue, 17 Jan 2017 10:53:30 +0000 作者:刘新修 地址:http://liuxinxiu.com:80/s/265/ 内容: /****** 以iphone为基准||宽度为100则为1倍宽 ******/ var y={} y.fontSize=100*(document.documentElement.clientWidth/320); var b = y.fontSize; b = b >= 240 ? 240 : b; //最大就240||100就是一倍宽 document.documentElement.style.fontSize = b + "px" Generated by Bo-blog 2.1.1 Release