滑鼠滾輪程式以及CSS的zoom屬性範例

來源:互聯網
上載者:User
<img src='http://www.lshdic.com/bbs/image/mu.jpg' onmousewheel='alert("滾輪值"+event.wheelDelta)' onclick='this.style.zoom=parseInt(this.style.zoom)+1' oncontextmenu='this.style.zoom=parseInt(this.style.zoom)-1;return false'id=a style='position:absolute;zoom:1' title='左鍵單擊放大1倍,按右鍵縮小1倍,滑鼠滾輪控制'>
<script>
top1=0;
function document.onmousewheel(){
if(event.wheelDelta>0)top1-=10;else top1+=10
a.style.top=top1
}
</script>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.