Posted in Javascript onJune 09, 2010
<HTML> <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <TITLE>onMouseWheel</TITLE> <SCRIPT> var count = 10; function Picture() { count = Counting(count); Resize(count); return false; } function Counting(count){ if (event.wheelDelta >= 120) count++; else if (event.wheelDelta <= -120) count--; return count; } function Resize(count){ oImage.style.zoom = count + '0%'; oCounter.innerText = count + '0%'; } </SCRIPT> </HEAD> <BODY> <div align=center> <span style="font-weight:bold">Size = <span id="oCounter" style="color:red;">100%</span></span> <img id="oImage" src="images/aaa.gif" onmousewheel="return Picture();" > </div> </BODY> </HTML>
JS 图片缩放效果代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@