在 Firefox 中禁用某些元素的浏览器缩放
是否可以在 Firefox 中禁用网页的浏览器内全页缩放(通过 Ctrl + 激活)?对于网页中的某些元素怎么样?我只是注意到有时元素在缩放时看起来非常奇怪,并且完全禁用这些元素的缩放可能会更好。
注意:我知道有几种方法可以找到缩放级别,但这确实是想要积极解决它(无论如何这可能不是一个好主意)。
Is it possible to disable the in-browser, full-page zoom in Firefox (activated by Ctrl +) for a webpage? How about for certain elements in a webpage? I just notice that sometimes elements look really weird when they are zoomed, and it might be nice to just disable the zooming completely for those elements.
Note: I know there a few ways to find the zoom level, but this is really wanting to actively work around it (which might not be a good idea anyway).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用主要通过此问题收集的信息:在 JavaScript 中捕获浏览器的“zoom”事件
在过去一天左右的时间里,我一直在尝试跟踪浏览器缩放,这大约是您在没有可以杀死的 onZoom 标准事件的情况下所能获得的最接近的结果。
不幸的是,我已经使用它有一段时间了,并且没有任何可靠的方法可以真正禁用它。缩放选项仍然可以通过主应用程序菜单使用,因此直到出现真正的跟踪缩放方法(包括页面重新加载后,这现在几乎是不可能的,此外,当您尝试跟踪缩放时,webkit 会表现出一些奇怪的行为)。
尽管许多人希望将浏览器缩放保持得更加隐藏,但我个人可以看到能够将缩放与调整大小分开观察可能带来的好处,因为它们在这一点上几乎无法区分(如果没有其他原因的话)。
Using information gathered largely through this question: Catch browser's "zoom" event in JavaScript
I've been playing around with attempting to track browser zoom for the last day or so, and this is about as close as you can get without an onZoom standard event that you can kill.
Unfortunately, and I've been playing with this for a while now, and there isn't any surefire way to really disable it. The zoom options are still available through main application menus, so until a real method of tracking zoom (including after page reloads, which mostly impossible right now, and, besides, webkit exhibits some odd behavior when you attempt to track zoom).
Although many people would like to keep browser zoom more hidden, I can personally see the possible benefits of being able to observe zoom separately from resize, as they are mostly indistinguishable at this point (and that's if for no other reason at all).