我也需要建立在我的网站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.
更多推荐
更改浏览器缩放级别
发布评论