更改浏览器缩放级别

编程入门 行业动态 更新时间:2024-10-28 08:30:20
本文介绍了更改浏览器缩放级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我也需要建立在我的网站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.

更多推荐

更改浏览器缩放级别

本文发布于:2023-11-09 16:14:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572830.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:缩放   浏览器   级别

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!