#div1 { border:1px solid red; width:200px; height:200px; } function scaleDom() { let div = document.getElementById('div1'); let zoom = parseInt(div.style.zoom, 10) || 100; zoom += event.wheelDelta / 12; if (zoom > 0) { div.style.zoom = `${zoom}%` } } ↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3 立即下载
#div1 { border:1px solid red; width:200px; height:200px; }
更新时间:2021-08-15 22:38:47