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.
精彩评论