在运行时禁用CTRL / Wheel缩放效果 [英] disable the CTRL/Wheel zoom effect at runtime

查看:188
本文介绍了在运行时禁用CTRL / Wheel缩放效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用css或javascript禁用某些元素的ctrl / wheel缩放效果。我创建一个菜单栏,当应用缩放效果时会变形。我想禁用它只是某些元素

How do you disable the ctrl/wheel zoom effect with css or javascript on certain elements. I create a menu bar that gets distorted when the zoom effect is applied. I would like to disable it for just certain elements.

推荐答案

更好的主意:设计你的布局,它的强大到足以应付变化喜欢这个。即使您修复了字体大小(您不应该首先执行此操作),也不能禁用它们,因此您也可以优雅地响应缩放。

Better idea: design your layout so that it's robust enough to handle changes like this. You can't disable them, even if you fix the font size (which you should never do in the first place), so you might as well respond to zooming gracefully.

事实是,如果所有元素都被浏览器同样缩放,页面的外观和工作,正是因为它以前一样(除了,你知道,大)以同样的方式,除非你把你的设计有些慵懒的快捷方式的地方。

The fact is, if all elements are scaled equally by the browser, your page should look and work exactly the same way as it did before (except, y'know, bigger) unless you took some lazy shortcuts in your design somewhere.

这篇关于在运行时禁用CTRL / Wheel缩放效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆