设备像素比devicePixelRatio
2017-12-28 00:00
246 查看
HTML代码:
JS代码:
转自:http://www.zhangxinxu.com/wordpress/2012/08/window-devicepixelratio/
<input type="button" id="button" value="点击弹出window.devicePixelRatio" />
JS代码:
document.getElementById("button").onclick = function() { alert(window.devicePixelRatio); };
转自:http://www.zhangxinxu.com/wordpress/2012/08/window-devicepixelratio/
相关文章推荐
- CSS基础篇--web移动端,需要清楚设备像素比devicePixelRatio的应用
- 设备像素比devicePixelRatio的应用
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 响应式布局—设备像素密度(-webkit-min-device-pixel-ratio)
- 设备像素比devicePixelRatio简单介绍
- 设备像素比(devicePixelRatio)
- 设备像素密度测试 (-webkit-min-device-pixel-ratio)
- 设备像素比(devicePixelRatio)
- 设备像素比devicePixelRatio简单介绍
- [置顶] 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍
- 设备像素比devicePixelRatio简单介绍