开发者

Is it possible to disable zoom using both keys as well as mousewheel in a page?

I want to disable zoom, be it Ctrl + -/+ or Ctrl + Scroll Wheel in all browsers. I tried using the code given in link. I also tried to disable the Ctrl key by using the following code:

$(document).keydown(function(e){
    if(e.keyCode == 17)
        return false;
    });

But it doesn't work开发者_如何转开发. I actually don't want to alert the user that zoom is disabled, so I can't use the alert() inside the above code.

Any suggestions?


Zoom is there for a reason. Understand it, build around it, but don't try to disable it. In the end, it's a bowser feature that is out of your hands. You can hack and slash but I doubt you'll ever find a perfect or even stable solution for what you are asking.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜