在js中进行计算
var t = window.devicePixelRatio // 获取下载的缩放 125% -> 1.25 150% -> 1.5
if (t > 1) {
document.body.style.zoom = 1.5 / t; // 就去修改页面的缩放比例
}
在js中进行计算
var t = window.devicePixelRatio // 获取下载的缩放 125% -> 1.25 150% -> 1.5
if (t > 1) {
document.body.style.zoom = 1.5 / t; // 就去修改页面的缩放比例
}
本文标题:js网页进行缩放的变形解决
本文链接:https://www.haomeiwen.com/subject/tkyggrtx.html
网友评论