更改浏览器缩放级别 [英] Changing the browser zoom level

查看:401
本文介绍了更改浏览器缩放级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也需要建立在我的网站2个按钮,将改变浏览器的缩放级别(+)( - )。我请求,因为图像大小和布局问题,浏览器缩放,而不是CSS变焦。

I have need to create 2 buttons on my site that would change the browser zoom level (+) (-). I'm requesting browser zoom and not css zoom because of image size and layout issues.

喏,就是这甚至可能?我听说冲突的报告。

Well, is this even possible? I've heard conflicting reports.

推荐答案

我会说在大多数浏览器不可能的,至少不是没有一些额外的插件。在任何情况下,我会尽量避免依赖于浏览器的缩放的实现而不同(有些浏览器只放大字体,别人放大图像,也等)。除非你不那么在意的用户体验。

I would say not possible in most browsers, at least not without some additional plugins. And in any case I would try to avoid relying on the browser's zoom as the implementations vary (some browsers only zoom the fonts, others zoom the images, too etc). Unless you don't care much about user experience.

如果你需要一个更可靠的变焦,然后再考虑缩放页面字体和图像JavaScript和CSS,或者可能在服务器端。图像和布局比例问题,可以这样解决。当然,这需要更多的工作。

If you need a more reliable zoom, then consider zooming the page fonts and images with JavaScript and CSS, or possibly on the server side. The image and layout scaling issues could be addressed this way. Of course, this requires a bit more work.

这篇关于更改浏览器缩放级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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