简体   繁体   English

禁用页面调整HTML大小

[英]Disable page resize HTML

I am trying to figure out how to disable the zoom function on a browser where the user can use the keyboard to enlarge text/images. 我试图弄清楚如何在浏览器上禁用缩放功能,用户可以使用键盘放大文本/图像。 The "Command +" and "Command -" function on the keyboard. 键盘上的“Command +”和“Command - ”功能。 How can I disable this function? 如何禁用此功能?

I have seen it done with annualreport.elevationchurch.org 我已经看到它完成了annualreport.elevationchurch.org

You could try using keyboard events to make a null, or pop up saying zoom disabled, event when users hit - or +. 您可以尝试使用键盘事件制作null,或者在用户点击时弹出说缩放禁用事件 - 或+。

http://api.jquery.com/category/events/keyboard-events/ http://api.jquery.com/category/events/keyboard-events/

Though that`s not the only way to zoom. 虽然这不是缩放的唯一方法。 You can also use your mouse or on certain browsers click view>zoom in. 您也可以使用鼠标或在某些浏览器上单击视图>放大。

I strongly recommend you don`t do that or try to disable zoom. 我强烈建议您不要这样做或尝试禁用缩放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM