您的位置:首页 > Web前端 > CSS

鼠标滚轮程序以及CSS的zoom属性范例

2009-07-04 00:53 351 查看
<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>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: