<!doctype html><html><head><meta charset="utf-8"><title>无标题文档</title><style>#pic{ width:135px; height:240px; margin:0 auto;}#pic img{width:135px; height:240px;}</style></head><body><div id="pic"><img src="123.JPG"><script>var pic=document.getElementById("pic")pic.onmousewheel=function(event){ //alert(event.wheelDelta) if(event.wheelDelta>0){ pic.style.transform="scale(2,2)"; } else if(event.wheelDelta<0){ pic.style.transform="scale(1,1)" } } </script></div></body></html>
添加回答
举报
0/150
提交
取消